PHPackages                             heri/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. heri/faker

ActiveRbschange-module[Utility &amp; Helpers](/categories/utility)

heri/faker
==========

Use Faker library to populate your RBSChange 4 database with fake data

213PHP

Since Mar 11Pushed 12y ago1 watchersCompare

[ Source](https://github.com/heristop/rbs-faker-module)[ Packagist](https://packagist.org/packages/heri/faker)[ RSS](/packages/heri-faker/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Faker for RBSChange 4
=====================

[](#faker-for-rbschange-4)

Have a [RBSChange 4](https://github.com/RBSChange/Change) project and need to fill your database for tests?

This module provides a command to load random data for any documents like media, products or orders for instance. It integrates [Faker](https://github.com/fzaninotto/Faker), a PHP library that generates fake data.

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

[](#installation)

Add the requirement to your `composer.json` file:

```
{
    "require": {
        "heri/faker": "dev-master"
    }
}
```

Then, install the module in the modules manager.

Usage
-----

[](#usage)

How it's works?

Specify entities to load, and the number of documents you want to create, in your configuration file `project.json`:

```
{
    "Heri":{
        "Faker":{
            "entities":{
                "Rbs_Media_Image":{
                    "number": 5
                },
                "Rbs_Brand_Brand":{
                    "number": 5
                },
                "Rbs_Stock_Sku":{
                    "number": 5
                },
                "Rbs_Catalog_Product":{
                    "number": 5
                }
            }
        }
    }
}
```

Lastly, run this command:

```
    php bin/change.phar faker:populate
```

In the previous example, the `Image` and `Brand` models share a relationship. If `Image` documents are populated first, Faker is smart enough to relate the populated Brand documents to one of the populated `Image` documents.

ProTips Configuration
---------------------

[](#protips-configuration)

You can add your own formatter for each column of each entity, with or without arguments:

```
{
    "Rbs_Media_Image":{
        "number": 10,
        "custom_formatters":{
            "path":{
                "method": "storeImage",
                "parameters":{
                    "width": "320",
                    "height": "240",
                    "category": "cats"
                }
            }
        }
    }
}
```

With the example above, we choose to generate images of cats:

[![ScreenShot](https://camo.githubusercontent.com/888a7a90462cc8a35ba39ad47fd43f0c817bba78fd730b8bc3ca31e11742ddf9/68747470733a2f2f7261772e6769746875622e636f6d2f6865726973746f702f5262734d6f64756c6546616b65722f6d61737465722f5265736f75726365732f646f632f6d656469615f73616d706c652e706e67)](https://camo.githubusercontent.com/888a7a90462cc8a35ba39ad47fd43f0c817bba78fd730b8bc3ca31e11742ddf9/68747470733a2f2f7261772e6769746875622e636f6d2f6865726973746f702f5262734d6f64756c6546616b65722f6d61737465722f5265736f75726365732f646f632f6d656469615f73616d706c652e706e67)

You can use all formatters provided by Faker:

```
{
    "Rbs_Stock_Sku":{
        "custom_formatters":{
            "ean13":{
                "method": "randomElement",
                "parameters":{
                    "values": [
                        "1234567891234",
                        "1234567891235",
                        "1234567891236"
                    ]
                }
            }
        }
    }
}
```

You can also set `null` to a column value in order to get the default value generated by the orm:

```
{
    "Rbs_Brand_Brand":{
        "custom_formatters":{
            "title": null
        }
    }
}
```

License
-------

[](#license)

This module is released under the MIT license. See the complete license in the module:

```
[Resources/meta/LICENSE](https://raw.github.com/heristop/RbsModuleFaker/master/Resources/meta/LICENSE)

```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/206870?v=4)[Alexandre Mogère](/maintainers/heristop)[@heristop](https://github.com/heristop)

---

Top Contributors

[![heristop](https://avatars.githubusercontent.com/u/206870?v=4)](https://github.com/heristop "heristop (12 commits)")

### Embed Badge

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

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

###  Alternatives

[swentel/nostr-php

Nostr helper library for PHP

6930.4k4](/packages/swentel-nostr-php)[inviqa/magento-symfony-container

Provides Magento with an instance of a Symfony DI Container

2436.5k](/packages/inviqa-magento-symfony-container)[internezzo/childreload

Neos CMS package that helps to reload the page on change of any of the child nodes of the specific nodetype

1176.8k1](/packages/internezzo-childreload)[swissup/theme-frontend-breeze-evolution

Breeze Evolution Theme

1528.8k2](/packages/swissup-theme-frontend-breeze-evolution)[marcw/rss-writer

A simple yet powerful RSS2 feed writer with RSS extensions support (like iTunes podcast tags)

1335.3k](/packages/marcw-rss-writer)

PHPackages © 2026

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