{"id":20298423,"url":"https://github.com/gmoqa/lazy-fixtures","last_synced_at":"2026-04-22T03:31:39.789Z","repository":{"id":98815292,"uuid":"150308248","full_name":"gmoqa/lazy-fixtures","owner":"gmoqa","description":"A easy way (even more) to add fixtures to your project","archived":false,"fork":false,"pushed_at":"2018-10-05T14:20:13.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-14T10:24:37.326Z","etag":null,"topics":[],"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/gmoqa.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":"2018-09-25T18:04:43.000Z","updated_at":"2020-03-12T17:37:51.000Z","dependencies_parsed_at":"2023-05-02T07:24:47.954Z","dependency_job_id":null,"html_url":"https://github.com/gmoqa/lazy-fixtures","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmoqa%2Flazy-fixtures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmoqa%2Flazy-fixtures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmoqa%2Flazy-fixtures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmoqa%2Flazy-fixtures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gmoqa","download_url":"https://codeload.github.com/gmoqa/lazy-fixtures/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241794138,"owners_count":20021192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-14T16:09:33.153Z","updated_at":"2025-12-04T11:04:13.179Z","avatar_url":"https://github.com/gmoqa.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LazyFixtures\n\n**LazyFixtures**  it's for lazy developers, who do not mind messing up their model layer a bit,\nif they will have absolute amazing fixtures in minutes.\n\nInstall the package with:\n\n```console\ncomposer require gmoqa/lazy-fixtures --dev\n```\n\n## Basic Usage\n\nThis will be easy, promise of lazy\n\n```php\n\u003c?php\n\nnamespace App\\Entity;\n\nuse Doctrine\\ORM\\Mapping as ORM;\nuse App\\Annotation\\LazyFixtures;\n\n/**\n * @LazyFixtures\\Entity(quantity=50)\n */\nclass Brand\n{\n    /**\n     * @ORM\\Id()\n     * @ORM\\GeneratedValue()\n     * @ORM\\Column(type=\"integer\")\n     */\n    private $id;\n\n    /**\n     * @ORM\\Column(type=\"string\", length=255)\n     * @LazyFixtures\\Field(type=\"domainWord\")\n     */\n    private $name;\n    \n    /**\n     * @ORM\\ManyToOne(targetEntity=\"App\\Entity\\User\", inversedBy=\"brands\")\n     * @LazyFixtures\\Relation\n     */\n    private $createdBy;\n}\n```\n\n_**LazyFixtures** use the [fzaninotto/Faker](https://github.com/fzaninotto/Faker) library to create\nthe fixtures, so you can use any type of those supported by faker._\n\n* @LazyFixtures\\Field(type=\"datetime\")\n\n* @LazyFixtures\\Field(type=\"sentence\")\n\n* ...etc\n\nNow  run the following command.\n\n```console\nphp bin/console lazy:fixtures:load\n```\n\nThat's all, easy, right?\n\n## Dependencies \n\nI said it would be simple\n\n```php\n\u003c?php\n\nnamespace App\\Entity;\n\nuse Doctrine\\ORM\\Mapping as ORM;\nuse App\\Annotation\\LazyFixtures;\n\n/**\n * @LazyFixtures\\Entity(quantity=50, dependencies={\"Brand\", \"User\"})\n */\nclass Brand\n{\n    ...\n}\n```\n\n## Summary\n\n1) Add `use` on your target entity.\n2) Add `@LazyFixtures\\Entity` Annotation on your target entity.\n3) Add `@LazyFixtures\\Field` Annotation on your target properties.\n4) Add `@LazyFixtures\\Relation` Annotation on your target `OneToMany/ManyToOne property. \n5) Run the command. \n\nThats is All. \n\nHappy Coding! ☕️\n\n## Roadmap\n\n* Support custom providers.\n* Ultra Lazy Mode (whitout any Annotations).\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmoqa%2Flazy-fixtures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgmoqa%2Flazy-fixtures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmoqa%2Flazy-fixtures/lists"}