xefi / faker-php-locales-ru-ru
Faker extension to include ru_RU locale
v1.0.1
2026-11-18 10:20 UTC
Requires
- php: ^8.3
- ext-mbstring: *
- psr/container: ^2.0
- xefi/faker-php: ^1.5.3
Requires (Dev)
- phpunit/phpunit: ^11
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Russian (ru_RU) locale for Faker PHP.
Installation
composer require --dev xefi/faker-php-locales-ru-ru
The service provider is discovered automatically through Composer.
Usage
use Xefi\Faker\Faker; $faker = new Faker('ru_RU');
Generators without a ru_RU variant fall back to the default locale.
What's included
- Names in Cyrillic, with surnames in the masculine or feminine form matching the first name:
name(),firstName(),lastName(?string $gender),title(). - Personal identifiers:
individualInn()(ИНН, 12 digits, two check digits) andsnils()(СНИЛС,XXX-XXX-XXX YY). - Company identifiers:
companyInn()(ИНН, 10 digits) andogrn()(ОГРН, 13 digits). - Addresses:
region(),regionCode(),city(), 6-digitpostcode(),streetName(),streetAddress()andfullAddress()in the Russian Post order (street, house, flat, city, region, postcode). - Phone numbers with the
8trunk prefix or the+7indicator. iban(): Russia does not use IBAN, so this returns an IBAN-shapedRUvalue built from a BIK and a 20-digit account number.- Colours and text in Russian;
words()lowercases Cyrillic correctly.
Contributing
- Fork the repository and create a branch from
main. - Add an extension under
src/Extensions/and register it inFakerRuRuServiceProvider::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