saicosys / cakephp-fake-data-plugin
Fake data generator plugin for CakePHP
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:cakephp-plugin
Requires
- php: >=8.1
- cakephp/cakephp: 5.1.*
Requires (Dev)
- cakephp/cakephp-codesniffer: ^5.0
- phpunit/phpunit: ^10.5.5 || ^11.1.3
This package is not auto-updated.
Last update: 2025-07-08 20:00:03 UTC
README
A lightweight CakePHP 5 plugin to generate and insert fake data into valid models only.
Introduction
Saicosys/FakeData
is a CakePHP 5 plugin designed to help developers and testers quickly generate and populate fake data into any existing model. It uses the own dummy content to generating realistic test data, while ensuring only valid models are targeted to maintain safety and structure.
Features
- Smart model detection — only generates data for existing models.
- Fully CLI-based — simple to run with options.
- Supports customizable record count.
- Perfect for local development, testing, and demo environments.
Use Cases
- Quickly populate your development database.
- Simulate large datasets for performance testing.
- Replace manual data entry with one command.
Installation
- Install the Plugin via Composer You can install the plugin using Composer by running the following command at the root of your CakePHP 5 project:
composer require saicosys/cakephp-fake-data-plugin --dev
- Load the Plugin
After installation, load the plugin:
bin/cake plugin load Saicosys/FakeData
Usage
List available models
bin/cake fake --list-models
Generate fake data for a model
bin/cake fake <model> <count>
Example:
bin/cake fake users 10
Preview (dry run) fake data
bin/cake fake users 5 --dry-run
Specify custom special fields
bin/cake fake users 10 --special-fields=avatar,logo,thumbnail
Options
--list-models, -l
: List available models for fake data generation.--dry-run, -d
: Show what would be generated without saving to the database.--special-fields, -s
: Comma-separated list of additional special fields (e.g.,avatar,logo
).
License
This plugin is licensed under the MIT License.