PHPackages                             ravage84/cakephp-fake-seeder - 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. [Database &amp; ORM](/categories/database)
4. /
5. ravage84/cakephp-fake-seeder

ActiveCakephp-plugin[Database &amp; ORM](/categories/database)

ravage84/cakephp-fake-seeder
============================

A shell to seed your database with fake and/or fixed data.

0.1.0(10y ago)104.5k8[3 issues](https://github.com/ravage84/cakephp-fake-seeder/issues)MITPHPPHP &gt;=5.3.0

Since Aug 31Pushed 4y agoCompare

[ Source](https://github.com/ravage84/cakephp-fake-seeder)[ Packagist](https://packagist.org/packages/ravage84/cakephp-fake-seeder)[ Docs](https://github.com/ravage84/cakephp-fake-seeder)[ RSS](/packages/ravage84-cakephp-fake-seeder/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

CakePHP Fake Seeder
===================

[](#cakephp-fake-seeder)

[![Travis-CI Build Status](https://camo.githubusercontent.com/2b04e3b8ba2fe2c8affdd8d2c713c376e7a129b070ce14bdbbb10d3c58e88801/68747470733a2f2f7472617669732d63692e6f72672f72617661676538342f63616b657068702d66616b652d7365656465722e706e67)](https://travis-ci.org/ravage84/cakephp-fake-seeder)[![Coverage Status](https://camo.githubusercontent.com/7da67fede2fd11882604825d5de51c921f96155e88d1d3e90f5bb9a7fecb81e6/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f72617661676538342f63616b657068702d66616b652d7365656465722e737667)](https://coveralls.io/r/ravage84/cakephp-fake-seeder?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/6145bcdd3fd66f9f300085690af4130cea19adf275755ab4d90b86150d5f56a3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72617661676538342f63616b657068702d66616b652d7365656465722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ravage84/cakephp-fake-seeder/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/be153412f717e4946913367fd853b4a003761311a12aed9258616544bd49982c/68747470733a2f2f706f7365722e707567782e6f72672f72617661676538342f63616b657068702d66616b652d7365656465722f642f746f74616c2e706e67)](https://packagist.org/packages/ravage84/cakephp-fake-seeder)[![Latest Stable Version](https://camo.githubusercontent.com/c71484a682a7bd9e64adbf41cdfc34cf7e24ff6d230ab2c8e055fa3b7835ceef/68747470733a2f2f706f7365722e707567782e6f72672f72617661676538342f63616b657068702d66616b652d7365656465722f762f737461626c652e706e67)](https://packagist.org/packages/ravage84/cakephp-fake-seeder)

A CakePHP shell to seed your database with fake and/or fixed data.

Uses Faker to generate the fake data. Uses shell tasks for implementing specific seeders. Organizes logical groups of seeders in custom seeder shells/suites.

Why should I use it?
--------------------

[](#why-should-i-use-it)

You are wondering why you should use this plugin instead of using [Faker](https://github.com/fzaninotto/Faker) directly or creating fake data on your own?

This plugin...

- keeps you from doing the repetitive work (DRY)
- provides you three working modes (manual faking to fully automatic guessing)
- helps you to stick to conventions, by following CakePHP's "Convention over Configuration" principle
- still provides you flexible configuration
- reduces documentation needs
- is properly covered by unit tests
- is easy to learn
- is extensible

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

[](#installation)

### Requirements

[](#requirements)

- PHP &gt;= 5.4
- CakePHP 2.x (tested with 2.6.2, 2.7.3)

### Installation via composer

[](#installation-via-composer)

```
composer require ravage84/cakephp-fake-seeder

```

### Installation alternatives

[](#installation-alternatives)

Refer to the CakePHP CookBook section [How To Install Plugins](http://book.cakephp.org/2.0/en/plugins/how-to-install-plugins.html).

CakePHP Version Support
-----------------------

[](#cakephp-version-support)

This plugin only supports CakePHP 2.x.

Versioning
----------

[](#versioning)

The releases of this plugin are versioned using [SemVer](http://semver.org/).

Configuration
-------------

[](#configuration)

Set the configuration key `FakeSeeder.seedable` to true, by adding `Configure::write('FakeSeeder.seedable', true);` to your boostrap code.

How to use
----------

[](#how-to-use)

After installing and configuring the plugin, you can invoke the shell by executing `php Console/cake.php FakeSeeder.seeder -h`.

```
Welcome to CakePHP v2.6.2 Console
---------------------------------------------------------------
App : app
Path: D:\dev\xampp\htdocs\cate\app\
---------------------------------------------------------------
A shell to seed your database with fake and/or fixed data.

Uses Faker to generate the fake data.
Uses shell tasks for implementing specific seeders.
Organizes logical groups of seeders in custom seeder shells/suites.

Usage:
cake fake_seeder.seeder [options] []

Options:

--help, -h         Display this help.
--verbose, -v      Enable verbose output.
--quiet, -q        Enable quiet output.
--mode, -m         The seeding mode.
                   'manual' = No Field formatters are guessed.
                   'auto' = All field formatters are guessed.
                   'mixed' = Only missing field formatters are guessed.
                   (choices: manual|auto|mixed)
--locale, -l       The locale to use for Faker.
--records, -r      The amount of records to seed.
--validate         Whether or not to validate when saving the seeding
                   data. (choices: first|1|)
--seed, -s         Set the seed number for Faker to use.
--no-truncate      Prevents that the model gets truncated before
                   seeding.

Arguments:

model  The name of a seeder shell task without 'SeederTask' suffix.
       For example 'Article' for 'ArticleSeederTask'.
       Alternatively the name of a model.
       It will try to guess the field formatters then.
       (optional)

All shell options can be set through:
1. CLI parameter, e.g. "--records"
2. The seeder specific configuration, e.g. "FakeSeeder.Article.records"
3. The general seeder configuration, e.g "FakeSeeder.records"
4. The seeder shell task class properties, e.g. "$_records"
The values are checked in that order. The first value found is taken.
If no value is set, it will fall back to an optional default value.

When no seeders are set (e.g. in a custom seeder suite) and if called
without arguments, it will prompt to execute one of the seeder shell
tasks available.

```

- See [ExampleSeederShell.php](Docs/Examples/ExampleSeederShell.php) for an example how to create a **custom seeder shell**.
- See [ExampleSeederTask.php](Docs/Examples/ExampleSeederTask.php) for an example how to create a **custom seeder task**.

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

[](#contributing)

See [CONTRIBUTING.md](CONTRIBUTING.md)

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md)

TODOs
-----

[](#todos)

- Improve Documentation
- Simplify integration of 3rd party data provider
- Implement seeder shell task baking
- Check possibility to use code for TestFixtures, like [gourmet/faker](https://github.com/gourmet/faker)

License
-------

[](#license)

This plugin is licensed under the [MIT License](LICENSE).

Attribution
-----------

[](#attribution)

This project was inspired by the works of others, such as:

- The book ["Build APIs You Won't Hate"](https://leanpub.com/build-apis-you-wont-hate) by [Phil Sturgeon](https://github.com/philsturgeon)
- The [Faker plugin for CakePHP 3.x](https://github.com/gourmet/faker) by [Jad Bitar](https://github.com/jadb)
- [Faker](https://github.com/fzaninotto/Faker) by [Francois Zaninotto](https://github.com/fzaninotto)
- [CakePHP Faker Fixtures Plugin](https://github.com/burriko/cakephp-faker-fixtures/)
- [CakePHP Seed Shell Plugin](https://github.com/jlis/Cake-Seed-Shell)

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.9% 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

Unknown

Total

1

Last Release

3949d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b319e683a7001c095bcf138d870d7b7ed12a1040e11c0264b914c2e213922169?d=identicon)[ravage84](/maintainers/ravage84)

---

Top Contributors

[![ravage84](https://avatars.githubusercontent.com/u/625761?v=4)](https://github.com/ravage84 "ravage84 (31 commits)")[![D4rkMindz](https://avatars.githubusercontent.com/u/16854141?v=4)](https://github.com/D4rkMindz "D4rkMindz (1 commits)")[![TekkCraft](https://avatars.githubusercontent.com/u/21214298?v=4)](https://github.com/TekkCraft "TekkCraft (1 commits)")

---

Tags

cakephpcakephp-pluginfakeseederpluginfakerfixturesdatacakephpseeder

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ravage84-cakephp-fake-seeder/health.svg)

```
[![Health](https://phpackages.com/badges/ravage84-cakephp-fake-seeder/health.svg)](https://phpackages.com/packages/ravage84-cakephp-fake-seeder)
```

###  Alternatives

[willdurand/faker-bundle

Put the awesome Faker lib into the DIC and populate your database with fake data.

2751.2M14](/packages/willdurand-faker-bundle)[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)[eighty8/laravel-seeder

Versioned, environment-based Seeders in Laravel

1858.4k](/packages/eighty8-laravel-seeder)

PHPackages © 2026

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