{"id":14983954,"url":"https://github.com/theofidry/alicedatafixtures","last_synced_at":"2025-05-14T06:13:09.749Z","repository":{"id":11002759,"uuid":"67957859","full_name":"theofidry/AliceDataFixtures","owner":"theofidry","description":"Nelmio Alice extension to persist the loaded fixtures.","archived":false,"fork":false,"pushed_at":"2025-03-09T12:41:52.000Z","size":836,"stargazers_count":316,"open_issues_count":8,"forks_count":74,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-11T18:25:25.080Z","etag":null,"topics":["alice","database","fixtures","manage-fixtures","php","symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":"","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/theofidry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":["theofidry"]}},"created_at":"2016-09-11T22:31:22.000Z","updated_at":"2025-03-11T13:55:42.000Z","dependencies_parsed_at":"2023-12-02T12:23:14.270Z","dependency_job_id":"9dbf89eb-2422-47a9-a06d-15fcfae29abd","html_url":"https://github.com/theofidry/AliceDataFixtures","commit_stats":{"total_commits":198,"total_committers":34,"mean_commits":5.823529411764706,"dds":0.4191919191919192,"last_synced_commit":"39a2fb2d83d683bec58e9fa0c1e22feceb17056e"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theofidry%2FAliceDataFixtures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theofidry%2FAliceDataFixtures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theofidry%2FAliceDataFixtures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theofidry%2FAliceDataFixtures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theofidry","download_url":"https://codeload.github.com/theofidry/AliceDataFixtures/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254083598,"owners_count":22011901,"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":["alice","database","fixtures","manage-fixtures","php","symfony","symfony-bundle"],"created_at":"2024-09-24T14:08:14.026Z","updated_at":"2025-05-14T06:13:09.726Z","avatar_url":"https://github.com/theofidry.png","language":"PHP","funding_links":["https://github.com/sponsors/theofidry"],"categories":[],"sub_categories":[],"readme":"AliceDataFixtures\n===========\n\n[Alice](https://github.com/nelmio/alice) 3.x no longer ships with a persistence layer, so this library provides one!\n\n[![Package version](https://img.shields.io/packagist/v/theofidry/alice-data-fixtures.svg?style=flat-square)](https://packagist.org/packages/theofidry/alice-data-fixtures)\n[![Build Status](https://github.com/theofidry/AliceDataFixtures/workflows/Test/badge.svg?branch=master)](https://github.com/theofidry/AliceDataFixtures/actions?query=branch%3Amaster)\n[![Slack](https://img.shields.io/badge/slack-%23alice--fixtures-red.svg?style=flat-square)](https://symfony-devs.slack.com/shared_invite/MTYxMjcxMjc0MTc5LTE0OTA3ODE4OTQtYzc4NWVmMzRmZQ)\n[![license](https://img.shields.io/badge/license-MIT-red.svg?style=flat-square)](LICENSE)\n\n\nSupports:\n\n* Symfony 6.4+\n* Doctrine ORM 2.20+\n* Doctrine ODM 2.0+\n* Doctrine PHPCR 2.0+\n* Eloquent 11.0+\n\n\n## Documentation\n\n1. [Installation](doc/installation.md/#installation)\n    1. [Without Symfony](doc/installation.md/#without-symfony)\n    1. [Symfony with Flex](doc/installation.md/#symfony-with-flex)\n    1. [Symfony without flex](doc/installation.md/#symfony-without-flex)\n        1. [Doctrine ORM](doc/installation.md/#doctrine-orm)\n        1. [Doctrine ODM](doc/installation.md/#doctrine-odm)\n        1. [Doctrine PHPCR](doc/installation.md/#doctrine-phpcr)\n        1. [Eloquent ORM](doc/installation.md/#eloquent-orm)\n        1. [Configuration](doc/installation.md/#configuration)\n1. [Basic usage](#basic-usage)\n1. [Configuration](#configuration)\n1. [Advanced usage](doc/advanced-usage.md#advanced-usage)\n    1. [Processors](doc/advanced-usage.md#processors)\n    1. [Exclude tables from purge](doc/advanced-usage.md#exclude-tables-from-purge)\n    1. [Usage in tests](doc/advanced-usage.md#usage-in-tests)\n        1. [PHPUnit](doc/advanced-usage.md#phpunit)\n        1. [Behat](doc/advanced-usage.md#behat)\n1. [Contributing](#contributing)\n\n\n## Configuration\n\nThe full configuration reference is:\n\n```yaml\n# app/config/config.yml\n\n# Default config\nfidry_alice_data_fixtures:\n    default_purge_mode: ~ # default is \"delete\" but you can change it to \"truncate\" or \"no_purge\"\n    db_drivers:\n        doctrine_orm: ~\n        doctrine_mongodb_odm: ~\n        doctrine_phpcr_odm: ~\n        eloquent_orm: ~\n```\n\nFor each driver, if the appropriate bundle is detected, e.g. DoctrineORMBundle for Doctrine and WouterJEloquentBundle\nfor Eloquent, the services related to those driver will be enabled. If you want to skip those checks you can turn\na specific driver to `true` instead. If you want to disable a specific driver, simply force the value `false` instead.\n\n\n## Basic usage\n\nCreate a fixture file in `src/AppBundle/Resources/fixtures`:\n\n```yaml\n# src/AppBundle/Resources/fixtures/dummy.yml\n\nAppBundle\\Entity\\Dummy:\n    dummy_{1..10}:\n        name: \u003cname()\u003e\n        related_dummy: '@related_dummy*'\n```\n\n```yaml\n# src/AppBundle/Resources/fixtures/related_dummy.yml\n\nAppBundle\\Entity\\RelatedDummy:\n    related_dummy_{1..10}:\n        name: \u003cname()\u003e\n```\n\nThen you can load those files using a `LoaderInterface`:\n\n```php\n\u003c?php\n\n$files = [\n    'path/to/src/AppBundle/Resources/fixtures/dummy.yml',\n    'path/to/src/AppBundle/Resources/fixtures/related_dummy.yml',\n];\n\n// Choose your loader\n$loader = $container-\u003eget('fidry_alice_data_fixtures.loader.doctrine');         // For Doctrine ORM\n$loader = $container-\u003eget('fidry_alice_data_fixtures.loader.doctrine_mongodb'); // For Doctrine MongoDB ODM\n$loader = $container-\u003eget('fidry_alice_data_fixtures.loader.doctrine_phpcr');   // For Doctrine PHPCR\n$loader = $container-\u003eget('fidry_alice_data_fixtures.loader.eloquent');         // For Eloquent ORM\n\n// Purge the objects, create PHP objects from the fixture files and persist them\n$objects = $loader-\u003eload($files);\n\n// $objects is now an array of persisted `Dummy` and `RelatedDummy`\n```\n\n**Warning**: loading the objects does not trigger a `clear()`. This means if\nyou are relying on some Doctrine life-cycle events in your tests, some may not\nbe triggered as expected. See #84 For more information.\n\n\n## Advanced Usage\n\nCheck the [advance usage entry](doc/advanced-usage.md).\n\n\n## Contributing\n\nClone the project\n\nTo launch Docker containers for databases, run `make start_databases`\n\nRun tests with `make test`.\n\nTo stop containers for databases, run `make stop_databases`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheofidry%2Falicedatafixtures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheofidry%2Falicedatafixtures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheofidry%2Falicedatafixtures/lists"}