{"id":16816834,"url":"https://github.com/sycho9/populater","last_synced_at":"2026-04-13T22:34:17.540Z","repository":{"id":99008568,"uuid":"227468246","full_name":"SychO9/populater","owner":"SychO9","description":":elephant: PHP script that populates your database tables with fake data using fzaninotto/faker","archived":false,"fork":false,"pushed_at":"2019-12-13T21:42:44.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-14T02:38:46.607Z","etag":null,"topics":["composer","data","database","fake","packagist","php","populate"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SychO9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-11T21:58:52.000Z","updated_at":"2019-12-13T21:42:46.000Z","dependencies_parsed_at":"2023-04-18T16:05:55.544Z","dependency_job_id":null,"html_url":"https://github.com/SychO9/populater","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SychO9/populater","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SychO9%2Fpopulater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SychO9%2Fpopulater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SychO9%2Fpopulater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SychO9%2Fpopulater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SychO9","download_url":"https://codeload.github.com/SychO9/populater/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SychO9%2Fpopulater/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31774090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composer","data","database","fake","packagist","php","populate"],"created_at":"2024-10-13T10:45:29.348Z","updated_at":"2026-04-13T22:34:17.520Z","avatar_url":"https://github.com/SychO9.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# populater\n![GitHub workflow](https://img.shields.io/github/workflow/status/SychO9/populater/tests?style=flat-square)\n![Latest Version](https://img.shields.io/github/release/SychO9/populater.svg?style=flat-square\u0026color=orange)\n![php](https://img.shields.io/badge/php-^7.2-red.svg?style=flat-square\u0026color=blue)\n![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square\u0026color=green)\n![downloads](https://img.shields.io/packagist/dt/sycho/populater?color=%23f28d1a\u0026style=flat-square)\n\n:elephant: PHP script that populates your database tables with fake data using **[fzaninotto/faker](https://github.com/fzaninotto/Faker)**\n\n## Installation\nIn progress...\n\n## Usage\nFirst of all, your **database schema** must be ready, the script does not currently help create it.\n\n### 1. Adding a database connection\nInorder for the script to work, a database connection is required, to add a connection use the following command\n\n```\n$ php populater add:connection \u003cconnection_name\u003e \u003cdriver\u003e \u003cdatabase\u003e \u003cusername\u003e \u003cpassword\u003e [\u003cprefix\u003e [\u003chost\u003e [\u003ccharset\u003e [\u003ccollation\u003e]]]]\n```\n\nExample:\n\n```shell\n$ php populater add:connection fake_db mysql fake_db fake_user fake_password\n```\n\n### 2. Selecting a connection\nYou have added one or more connections to the script, now you have to select a connection to use before anything else,\n\nto do so, use the following command\n```\n$ php populater use:connection \u003cconnection_name\u003e\n```\n\n##### Example\n```shell\n$ php populater use:connection fake_db\n```\n\n### 3. Creating a blueprint\nEvery table will have a blueprint, a blueprint is used to determine the data format to generate for each column of the table,\n\nto create a blueprint, use the following command\n\n```\n$ php populater create:blueprint \u003ctable_name\u003e \u003cnumber_of_columns\u003e [\u003cdatabase\u003e]\n```\n\nYou can make the table blueprint database specific by filling the `database` argument, or make it a common blueprint by leaving it empty.\n\nNext you'll have to fill in the information about the columns, a `name` and a `generator`, the generator is basically the formatter used from the **fzaninotto/faker** package, a list of all formatters are available in the [package's github repository](https://github.com/fzaninotto/Faker).\n\n##### Example\n```\nColumn n°1:\n        name: id\n        generator: autoIncrement\nColumn n°2:\n        name: first_name\n        generator: firstName\nColumn n°3:\n        name: last_name\n        generator: lastName\nColumn n°4:\n        name: phone_number\n        generator: phoneNumber\nColumn n°5:\n        name: birth_date\n        generator: dateTime:'2005-02-25 08:37:17':UTC\nColumn n°6:\n        name: email\n        generator: freeEmail\nColumn n°7:\n        name: passwrd\n        generator: password\n```\n\nThe generator definition follows the following format: `method:param1:param2:param3...`, don't forget to surround a parameter with quotes if it contains a colon.\n\n#### Manually adding a blueprint\nAdditionally you can manually create the blueprint:\n\n1. Inside the storage folder create a folder by the name of your database name [optional]\n2. Create a `{table_name}.yml` file and fill it with the information about you table columns\n\n##### Example\n```yaml\nformat:\n    id: autoIncrement\n    first_name: firstName\n    last_name: lastName\n    phone_number: phoneNumber\n    birth_date: 'dateTime:''2005-02-25 08:37:17'':UTC'\n    email: freeEmail\n    passwrd: password\n```\n\n### 4. Populating your database table(s)\nNow that the script has all the necessary information to run, it's time to populate your tables.\n\nCurrently you can only fill one table at a time, using the following command\n```\n$ php populate \u003cblueprint\u003e \u003crows\u003e\n```\n\n##### Example\n```\n$ php populate fake_users 200\n[▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰ ] 100% 11 secs 8.0 MiB\n...\n...\n...\nFinished in 14.583ms\n```\n\n## Commands\nAnd of course the list of all commands can be found by running the following command\n\n```\n$ php populater\nConsole Tool\n\nUsage:\n  command [options] [arguments]\n\nOptions:\n  -h, --help            Display this help message\n  -q, --quiet           Do not output any message\n  -V, --version         Display this application version\n      --ansi            Force ANSI output\n      --no-ansi         Disable ANSI output\n  -n, --no-interaction  Do not ask any interactive question\n  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output,\n 2 for more verbose output and 3 for debug\n\nAvailable commands:\n  help              Displays help for a command\n  list              Lists commands\n  populate          Populates a table\n add\n  add:connection    Adds a new database connection\n create\n  create:blueprint  Creates a blueprint\n list\n  list:blueprints   Lists existing blueprints\n  list:connections  Lists all added connections\n show\n  show:connection   Shows info on the current connection\n use\n  use:connection    Changes the current connection\n```\n\n## License\nThe MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsycho9%2Fpopulater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsycho9%2Fpopulater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsycho9%2Fpopulater/lists"}