xefi / faker-php-locales-ro-ro
Faker extension to include ro_RO locale
v1.0.1
2026-11-18 10:22 UTC
Requires
- php: ^8.3
- psr/container: ^2.0
- xefi/faker-php: ^1.5.3
Requires (Dev)
- phpunit/phpunit: ^11
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Romanian (ro_RO) locale for Faker PHP.
Installation
composer require --dev xefi/faker-php-locales-ro-ro
The service provider is discovered automatically through Composer.
Usage
use Xefi\Faker\Faker; $faker = new Faker('ro_RO');
Generators without a ro_RO variant fall back to the default locale.
Extensions
This package provides ro_RO variants of the address, colors, company, financial, person, phone and text extensions.
On top of the standard generators, it adds:
| Method | Extension | Description |
|---|---|---|
cnp(?string $gender = null) |
Person | Personal numeric code (CNP) with control digit |
cui() |
Company | Fiscal identification code (CUI / CIF) with control digit |
vat() |
Company | VAT number (RO + CUI) |
county() |
Address | County (judeČ›) as [code => name], e.g. ['CJ' => 'Cluj'] |
Contributing
- Fork the repository and create a branch from
main. - Add an extension under
src/Extensions/and register it inFakerRoRoServiceProvider::boot(). - Add a test under
tests/Unit/. - Run the suite with
vendor/bin/phpunit(ordocker compose run php vendor/bin/phpunit). - Open a pull request against
main.
License
MIT