marcin-orlowski / polish-ids-faker
FakerPHP provider for generating various IDs used in Poland
Package info
github.com/MarcinOrlowski/php-polish-ids-faker
pkg:composer/marcin-orlowski/polish-ids-faker
1.0.0
2026-07-06 09:10 UTC
Requires
- php: >=8.1
- fakerphp/faker: ^1.24.1
Requires (Dev)
- marcin-orlowski/polish-ids: @dev
- phpstan/phpstan: ^2.2
- phpunit/phpunit: ^13.2.2
This package is auto-updated.
Last update: 2026-07-06 09:14:02 UTC
README
█▀▀▄ ▀█ ▀ █ ▀█▀ █▀▀▄ █▀▀▀ █
█ █ ▄▀▀▄ █ ▀█ ▄▀▀▄ █▀▀▄ █ █ █ ▄▀▀▄ █▀▀ ▄▀▀▄ █ ▄▀ ▄▀▀▄ █▄▀
█▀▀ █ █ █ █ ▀▄ █ █ █ █ █ ▀▄ █ ▄▄█ █▀▄ █▀▀ █
█ ▀▄▄▀ ▄█▄ ▄█▄ ▀▄▄▀ █ █ ▄█▄ █▄▄▀ ▀▄▄▀ █ ▀▄▄▀ █ █ ▀▄▄▀ █
Faker generators for various Polish IDs
Data provider for various IDs used in Poland as NIP, PESEL, REGON, and others so you can easily generate fake data for testing and development purposes.
Installation
composer require --dev marcin-orlowski/polish-ids-faker
Generators
This extensions provides following generators:
nip(): string
Produces a valid NIP number in various formats.
Arguments
| Argument | Type | Default | Description |
|---|---|---|---|
$grouping |
NipGrouping |
RANDOM |
Specifies format of the generated NIP. See NipGrouping.php for details. |
pesel(): string
Generates a valid Polish PESEL number.
Arguments
| Argument | Type | Default | Description |
|---|---|---|---|
$gender |
PeselGender |
RANDOM |
Enforces PESEL for person of specific gender. See PeselGender.php for details. |
$birthDate |
?\DateTimeInterface |
null |
Optional specific date of birth. If null, a random date is generated. |
regon(): string
Generates a valid 14-digit long Polish REGON number.
Arguments
None
kodPocztowy(): string
Generates a valid 6 character long Polish Zip code number.
Arguments
None