Search by

xefi / faker-php-locales-ru-ru

martinsoenen

Faker extension to include ru_RU locale

Package info

github.com/xefi/faker-php-locales-ru-ru

pkg:composer/xefi/faker-php-locales-ru-ru

Statistics

Installs: 5

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.1 2026-11-18 10:20 UTC

This package is auto-updated.

Last update: 2026-11-18 11:04:49 UTC


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) and snils() (СНИЛС, XXX-XXX-XXX YY).
  • Company identifiers: companyInn() (ИНН, 10 digits) and ogrn() (ОГРН, 13 digits).
  • Addresses: region(), regionCode(), city(), 6-digit postcode(), streetName(), streetAddress() and fullAddress() in the Russian Post order (street, house, flat, city, region, postcode).
  • Phone numbers with the 8 trunk prefix or the +7 indicator.
  • iban(): Russia does not use IBAN, so this returns an IBAN-shaped RU value built from a BIK and a 20-digit account number.
  • Colours and text in Russian; words() lowercases Cyrillic correctly.

Contributing

  1. Fork the repository and create a branch from main.
  2. Add an extension under src/Extensions/ and register it in FakerRuRuServiceProvider::boot().
  3. Add a test under tests/Unit/.
  4. Run the suite with vendor/bin/phpunit (or docker compose run php vendor/bin/phpunit).
  5. Open a pull request against main.

License

MIT