PHPackages                             sedkiy/faker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. sedkiy/faker

ActiveLibrary[Testing &amp; Quality](/categories/testing)

sedkiy/faker
============

FakerPHP extension providing locale-specific data providers for 19 countries across the MENA region, Europe, and North America.

v1.0.4(2w ago)110↓100%MITPHPPHP ^8.1

Since May 22Pushed 2w agoCompare

[ Source](https://github.com/younes-sedki/sedkiy-faker)[ Packagist](https://packagist.org/packages/sedkiy/faker)[ RSS](/packages/sedkiy-faker/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (5)Dependencies (10)Versions (6)Used By (0)

 [![Sedkiy Faker Banner](.github/images/banner.png)](.github/images/banner.png)Sedkiy Faker
============

[](#sedkiy-faker)

A professional [FakerPHP](https://fakerphp.org/) extension for generating culturally accurate, hyper-localized test data across 19 countries.

 [![Latest Version on Packagist](https://camo.githubusercontent.com/8314386e9566c28c2f0ccc440b408caa3ff787c099c7d53580acf16776bf90e0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7365646b69792f66616b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sedkiy/faker) [![Total Downloads](https://camo.githubusercontent.com/f267a12ca4d0148c1b32879d4527f516c23b7f280fbb6d633bc4fdbb4efbb1b0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7365646b69792f66616b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sedkiy/faker) [![License](https://camo.githubusercontent.com/d6bc68b2e70068130e8a78ed7e13426839834bef033dfe38216ad797fcbd99b8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7365646b69792f66616b65722e7376673f7374796c653d666c61742d737175617265)](LICENSE.md) [![PHP](https://camo.githubusercontent.com/43a52de372d08e615769aeeed8ba305d51236062c2f310351a08c9805d833f33/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d3737374242343f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://camo.githubusercontent.com/43a52de372d08e615769aeeed8ba305d51236062c2f310351a08c9805d833f33/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d3737374242343f7374796c653d666c61742d737175617265266c6f676f3d706870) [![Laravel](https://camo.githubusercontent.com/f002ff4a2256ffcb0be8275519086e42196dae3482e3d466f7f04d7678ab005a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d3130253230253743253230313125323025374325323031322d4646324432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c)](https://camo.githubusercontent.com/f002ff4a2256ffcb0be8275519086e42196dae3482e3d466f7f04d7678ab005a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d3130253230253743253230313125323025374325323031322d4646324432303f7374796c653d666c61742d737175617265266c6f676f3d6c61726176656c)

---

Why Sedkiy Faker?
-----------------

[](#why-sedkiy-faker)

Standard FakerPHP locale fallbacks produce structurally invalid phone numbers, non-existent cities, and culturally mismatched data. Sedkiy Faker intercepts and fixes these issues at the container level.

Standard FakerPHP FallbacksSedkiy Faker Localized EngineStructurally invalid phone formatsReal ITU-T compliant mobile and landline numbersNon-existent / generic city namesAuthentic city and region catalogs per territoryCulturally mismatched name honorificsGender and region-specific honors (e.g., `Si`, `Lalla`)Complex setup and overriding issuesZero-configuration auto-extension into Laravel---

Requirements
------------

[](#requirements)

- **PHP** 8.1 or higher
- **Composer**
- **Laravel** 10, 11, or 12 *(optional)*

---

Installation
------------

[](#installation)

Install the package via Composer into your development dependencies:

```
composer require sedkiy/faker --dev
```

---

Usage
-----

[](#usage)

### Standalone PHP Usage

[](#standalone-php-usage)

Instantiate a localized generator manually using the fluent `SedkiyFaker` factory wrapper:

```
use Sedkiy\Faker\SedkiyFaker;

// Create Moroccan-specific Faker instance
$faker = SedkiyFaker::locale('ar_MA')->make();

$faker->name();         // "Mr. Youssef Alami"
$faker->city();         // "Casablanca"
$faker->phoneNumber();  // "+212 6 12 34 56 78"
$faker->postCode();     // "20000"
$faker->freeEmail();    // "youssef.alami@menara.ma"
```

#### Seeding (Reproducible Outputs)

[](#seeding-reproducible-outputs)

Set a seed value to ensure generated data remains reproducible across test runs:

```
$faker = SedkiyFaker::locale('de_DE')->seed(1337)->make();
```

#### Chaining Custom Providers

[](#chaining-custom-providers)

Add extra custom providers seamlessly without losing country-specific features:

```
$faker = SedkiyFaker::locale('fr_FR')
    ->withProvider(\Faker\Provider\fr_FR\Text::class)
    ->make();
```

---

### Laravel Integration (Zero Code Changes)

[](#laravel-integration-zero-code-changes)

Important

**Zero Code Pollution:** There is absolutely no need to edit your existing Factory or Seeder files. Sedkiy Faker hooks directly into Laravel's native `fake()` helper and `$this->faker` property using container extenders.

To configure, simply specify your desired locale in your `.env` file:

```
FAKER_LOCALE=ar_MA
# Or use the package-specific override:
SEDKIY_FAKER_LOCALE=ar_MA
```

*(If omitted, the package falls back to `app.faker_locale` in `config/app.php`, then `en_US`.)*

Once configured, your standard Laravel factories will generate localized data automatically:

```
// database/factories/UserFactory.php

public function definition(): array
{
    // These will now automatically generate culturally accurate data for ar_MA!
    return [
        'name'    => fake()->name(),         // e.g. "Youssef Alami"
        'address' => fake()->streetAddress(),// e.g. "Avenue Hassan II"
        'phone'   => fake()->phoneNumber(),  // e.g. "+212 6 12 34 56 78"
        'email'   => fake()->freeEmail(),    // e.g. "youssef@menara.ma"
    ];
}
```

#### Configuration File (Optional)

[](#configuration-file-optional)

If you want to customize default settings, publish the configuration file:

```
php artisan vendor:publish --tag="sedkiy-faker-config"
```

---

Supported Locales
-----------------

[](#supported-locales)

### MENA Region

[](#mena-region)

LocaleCountryAvailable Providers**`ar_MA`**MoroccoPerson, Address, PhoneNumber, Internet**`ar_DZ`**AlgeriaPerson, Address, PhoneNumber, Internet**`ar_TN`**TunisiaPerson, Address, PhoneNumber, Internet**`ar_EG`**EgyptPerson, Address, PhoneNumber, Internet**`ar_LY`**LibyaPerson, Address, PhoneNumber, Internet**`ar_SA`**Saudi ArabiaPerson, Address, PhoneNumber, Internet**`ar_LB`**LebanonPerson, Address, PhoneNumber, Internet**`ar_JO`**JordanPerson, Address, PhoneNumber, Internet### Europe &amp; North America

[](#europe--north-america)

LocaleCountryAvailable Providers**`fr_FR`**FrancePerson, Address, PhoneNumber**`de_DE`**GermanyPerson, Address, PhoneNumber**`es_ES`**SpainPerson, Address, PhoneNumber**`it_IT`**ItalyPerson, Address, PhoneNumber**`pt_PT`**PortugalPerson, Address, PhoneNumber**`en_GB`**United KingdomPerson, Address, PhoneNumber**`nl_NL`**NetherlandsPerson, Address, PhoneNumber**`nl_BE`**BelgiumPerson, Address, PhoneNumber**`pl_PL`**PolandPerson, Address, PhoneNumber**`ro_RO`**RomaniaPerson, Address, PhoneNumber**`en_US`**United StatesPerson, Address, PhoneNumber---

Testing
-------

[](#testing)

Tests are written using [Pest PHP](https://pestphp.com/) and validate reproducibility, phone number format conforms to ITU-T plans, postcode regex compliance, and container extensions.

```
composer install
vendor/bin/pest
```

---

Contributing
------------

[](#contributing)

We welcome your contributions to extend coverage to more locales! Please follow this workflow:

1. **Fork the Repository** and create a feature branch.
2. **Adhere to Code Standards**: Check and format your changes with PHP CS Fixer (`composer run php-cs-fixer`).
3. **Data Integrity**: New locale dictionaries must contain at least 30 real-world entries.
4. **Testing**: Add corresponding test assertions inside `tests/Providers/`.
5. **Submit a Pull Request** describing your changes.

---

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT License](LICENSE.md).

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance96

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

18d ago

PHP version history (2 changes)v1.0.0PHP ^8.3

v1.0.1PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/73e25badfdc34a17ce00a8273079ab68010f660febd3630499ca985708589a72?d=identicon)[younes-sedki](/maintainers/younes-sedki)

---

Top Contributors

[![younes-sedki](https://avatars.githubusercontent.com/u/239684759?v=4)](https://github.com/younes-sedki "younes-sedki (10 commits)")

---

Tags

fake-datafakerfakerphplaravellaravel-packagephpseedingtestingtestinglaravelfakerlocalefakerphp

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/sedkiy-faker/health.svg)

```
[![Health](https://phpackages.com/badges/sedkiy-faker/health.svg)](https://phpackages.com/packages/sedkiy-faker)
```

###  Alternatives

[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k41.3M38.3k](/packages/orchestra-testbench)[hotmeteor/spectator

Testing helpers for your OpenAPI spec

3041.5M1](/packages/hotmeteor-spectator)[orchestra/workbench

Workbench Companion for Laravel Packages Development

8219.1M67](/packages/orchestra-workbench)[guanguans/laravel-soar

SQL optimizer and rewriter for laravel. - laravel 的 SQL 优化器和重写器。

2248.3k](/packages/guanguans-laravel-soar)[spurwork/spectator

Testing helpers for your OpenAPI spec

3041.5k](/packages/spurwork-spectator)[mominalzaraa/filament-localization

The first and only automatic Filament localization package with intelligent resource scanning, structured translation files, and comprehensive testing

101.6k](/packages/mominalzaraa-filament-localization)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
