Download the PHP package sedkiy/faker without Composer
On this page you can find all versions of the php package sedkiy/faker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package faker
Sedkiy Faker
A FakerPHP extension for generating culturally accurate, hyper-localized test data across 19 countries.
Table of Contents
- Why Sedkiy Faker?
- Requirements
- Installation
- Quick Start
- Usage
- Standalone PHP
- Reproducible Output (Seeding)
- Custom Providers
- Laravel Integration
- Supported Locales & Fields
- Testing
- Contributing
- License
Why Sedkiy Faker?
Standard FakerPHP locale fallbacks often produce structurally invalid phone numbers, non-existent cities, and culturally mismatched honorifics. Sedkiy Faker fixes this at the container level, so fake() just works correctly out of the box.
| Standard FakerPHP Fallbacks | Sedkiy Faker Localized Engine |
|---|---|
| Structurally invalid phone formats | Real ITU-T compliant mobile and landline numbers |
| Non-existent / generic city names | Authentic city and region catalogs per territory |
| Culturally mismatched name honorifics | Gender and region-specific honorifics (e.g., Si, Lalla) |
| Manual setup and provider overriding | Zero-configuration auto-extension into Laravel |
Requirements
| Requirement | Version |
|---|---|
| PHP | 8.1+ |
| Composer | Any recent version |
| Laravel | 10, 11, or 12 (optional — not required for standalone use) |
Installation
Quick Start
That's it — no config files, no service provider setup required for standalone use.
Usage
Standalone PHP Usage
Instantiate a localized generator manually using the fluent SedkiyFaker factory:
Reproducible Outputs (Seeding)
Pass a seed to get deterministic output across test runs:
Chaining Custom Providers
Add your own providers on top without losing locale-specific behavior:
This also works with fully custom provider classes you write yourself — useful for fields Sedkiy Faker doesn't ship with (national ID formats, tax numbers, etc.).
Laravel Integration (Zero Code Changes)
Zero Code Pollution — there's no need to touch your existing factories or seeders. Sedkiy Faker hooks directly into Laravel's
fake()helper and$this->fakerproperty via container extenders.
Set your desired locale in .env:
If omitted, it falls back to
app.faker_localeinconfig/app.php, then toen_US.
Your existing factories now generate localized data automatically:
Publishing the Config File (Optional)
Supported Locales & Fields
Each locale supports the Person, Address, Internet, and (MENA only) PhoneNumber providers. Commonly used methods per category:
- Person —
name(),firstName(),firstNameMale(),firstNameFemale(),lastName(),title(),titleMale(),titleFemale() - Address —
city(),streetAddress(),address(),postcode(),state() - PhoneNumber (MENA locales) —
phoneNumber(),mobileNumber() - Internet —
email(),freeEmail(),userName(),domainName()
Note: Fields outside these categories (e.g.
jobTitle(),url()) are not part of this package's localized data and will fall back to FakerPHP's generic/default provider output — verify with a quick test before relying on them in a specific locale.
MENA Region
| Locale | Country | Providers |
|---|---|---|
ar_MA |
Morocco | Person, Address, PhoneNumber, Internet |
ar_DZ |
Algeria | Person, Address, PhoneNumber, Internet |
ar_TN |
Tunisia | Person, Address, PhoneNumber, Internet |
ar_EG |
Egypt | Person, Address, PhoneNumber, Internet |
ar_LY |
Libya | Person, Address, PhoneNumber, Internet |
ar_SA |
Saudi Arabia | Person, Address, PhoneNumber, Internet |
ar_LB |
Lebanon | Person, Address, PhoneNumber, Internet |
ar_JO |
Jordan | Person, Address, PhoneNumber, Internet |
Europe & North America
| Locale | Country | Providers |
|---|---|---|
fr_FR |
France | Person, Address, PhoneNumber |
de_DE |
Germany | Person, Address, PhoneNumber |
es_ES |
Spain | Person, Address, PhoneNumber |
it_IT |
Italy | Person, Address, PhoneNumber |
pt_PT |
Portugal | Person, Address, PhoneNumber |
en_GB |
United Kingdom | Person, Address, PhoneNumber |
nl_NL |
Netherlands | Person, Address, PhoneNumber |
nl_BE |
Belgium | Person, Address, PhoneNumber |
pl_PL |
Poland | Person, Address, PhoneNumber |
ro_RO |
Romania | Person, Address, PhoneNumber |
en_US |
United States | Person, Address, PhoneNumber |
Testing
Tests are written with Pest PHP and validate reproducibility, ITU-T phone format compliance, postcode regex rules, and container extensions.
Contributing
Contributions that extend locale coverage are welcome:
- Fork the repository and create a feature branch.
- Follow code standards — format with PHP CS Fixer:
composer run php-cs-fixer. - Ensure data integrity — new locale dictionaries need at least 30 real-world entries.
- Add tests in
tests/Providers/for any new locale or field. - Open a Pull Request describing your changes.
License
Open-sourced under the MIT License.