{"id":13563050,"url":"https://github.com/nelmio/alice","last_synced_at":"2026-10-19T08:03:49.359Z","repository":{"id":5239338,"uuid":"6416536","full_name":"nelmio/alice","owner":"nelmio","description":"Expressive fixtures generator","archived":false,"fork":false,"pushed_at":"2026-06-15T21:34:35.000Z","size":5647,"stargazers_count":2539,"open_issues_count":52,"forks_count":328,"subscribers_count":43,"default_branch":"main","last_synced_at":"2026-10-12T00:33:56.151Z","etag":null,"topics":["alice","expression-language","faker","fixture","fixtures","manage-fixtures","php","symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"coyno/bitcore-electrum","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nelmio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["theofidry"]}},"created_at":"2012-10-27T11:57:40.000Z","updated_at":"2026-09-25T03:42:41.000Z","dependencies_parsed_at":"2025-12-30T18:02:27.935Z","dependency_job_id":null,"html_url":"https://github.com/nelmio/alice","commit_stats":{"total_commits":883,"total_committers":148,"mean_commits":5.966216216216216,"dds":0.565118912797282,"last_synced_commit":"5b87f6471351f89e019d24473c19b998cbf4c1f3"},"previous_names":[],"tags_count":85,"template":false,"template_full_name":null,"purl":"pkg:github/nelmio/alice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nelmio%2Falice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nelmio%2Falice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nelmio%2Falice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nelmio%2Falice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nelmio","download_url":"https://codeload.github.com/nelmio/alice/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nelmio%2Falice/sbom","scorecard":{"id":381970,"data":{"date":"2025-08-11","repo":{"name":"github.com/nelmio/alice","commit":"5eaa3dcf17cc607675bb0863cca2882c0240910e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yaml:1","Warn: no topLevel permission defined: .github/workflows/static-analysis.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":1,"reason":"Found 2/12 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/nelmio/alice/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/nelmio/alice/ci.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yaml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/nelmio/alice/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/static-analysis.yaml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/nelmio/alice/static-analysis.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/static-analysis.yaml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/nelmio/alice/static-analysis.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/static-analysis.yaml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/nelmio/alice/static-analysis.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/static-analysis.yaml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/nelmio/alice/static-analysis.yaml/main?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T15:39:46.869Z","repository_id":5239338,"created_at":"2025-08-18T15:39:46.869Z","updated_at":"2025-08-18T15:39:46.869Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38351721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-19T02:00:06.414Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["alice","expression-language","faker","fixture","fixtures","manage-fixtures","php","symfony","symfony-bundle"],"created_at":"2024-08-01T13:01:14.651Z","updated_at":"2026-10-19T08:03:49.035Z","avatar_url":"https://github.com/nelmio.png","language":"PHP","funding_links":["https://github.com/sponsors/theofidry"],"categories":["Table of Contents","测试","PHP","测试 Testing","Testing","目录","Testing and Quality","测试( Testing )"],"sub_categories":["Testing","测试 Testing","Globalization"],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"doc/img/nelmio.png\" width=300 /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=center\u003eAlice - Expressive fixtures generator\u003c/h1\u003e\n\n[![Package version](https://img.shields.io/packagist/v/nelmio/alice.svg?style=flat-square)](https://packagist.org/packages/nelmio/alice)\n[![Build Status](https://github.com/nelmio/alice/workflows/CI/badge.svg?branch=master)](https://github.com/nelmio/alice/actions)\n[![Slack](https://img.shields.io/badge/slack-%23alice--fixtures-red.svg?style=flat-square)](https://symfony.com/slack-invite)\n[![License](https://img.shields.io/badge/license-MIT-red.svg?style=flat-square)](LICENSE)\n\n\nRelying on [FakerPHP/Faker](https://github.com/FakerPHP/Faker), Alice\nallows you to create a ton of fixtures/fake data for use while developing\nor testing your project. It gives you a few essential tools to make it\nvery easy to generate complex data with constraints in a readable and easy\nto edit way, so that everyone on your team can tweak the fixtures if needed.\n\n**Warning: this doc is for alice 3.0. If you want to check the documentation\nfor 2.x, follow [this link](https://github.com/nelmio/alice/tree/2.x)**.\n\n**2.x is in maintenance mode: PRs are accepted, but no active development is done on it by the maintainers any longer.**\n\n\n## Table of Contents\n\n1. [Installation](#installation)\n1. [Example](#example)\n1. [Getting Started](doc/getting-started.md)\n    1. [Basic Usage](doc/getting-started.md#basic-usage)\n    1. [Framework integration](doc/getting-started.md#framework-integration)\n        1. [Symfony](doc/getting-started.md#symfony)\n1. [Complete Reference](doc/complete-reference.md)\n    1. [Creating Fixtures](doc/complete-reference.md#creating-fixtures)\n        1. [YAML](doc/complete-reference.md#yaml)\n        1. [PHP](doc/complete-reference.md#php)\n        1. [JSON](doc/complete-reference.md#json)\n    1. [Fixture Ranges](doc/complete-reference.md#fixture-ranges)\n    1. [Fixture Lists](doc/complete-reference.md#fixture-lists)\n    1. [Fixture Reference](doc/complete-reference.md#fixture-reference)\n    1. [Calling Methods](doc/complete-reference.md#calling-methods)\n        1. [Method arguments with flags](doc/complete-reference.md#method-arguments-with-flags)\n        1. [Method arguments with parameters](doc/complete-reference.md#method-arguments-with-parameters)\n    1. [Specifying Constructor Arguments](doc/complete-reference.md#specifying-constructor-arguments)\n    1. [Using a factory / a named constructor](doc/complete-reference.md#using-a-factory--a-named-constructor)\n    1. [Optional Data](doc/complete-reference.md#optional-data)\n    1. [Handling Unique Constraints](doc/complete-reference.md#handling-unique-constraints)\n1. [Handling Relations](doc/relations-handling.md)\n    1. [References](doc/relations-handling.md#references)\n    1. [Multiple References](doc/relations-handling.md#multiple-references)\n    1. [Self reference](doc/relations-handling.md#self-reference)\n    1. [Passing references to providers](doc/relations-handling.md#passing-references-to-providers)\n1. [Keep Your Fixtures Dry](doc/fixtures-refactoring.md)\n    1. [Fixture Inheritance](doc/fixtures-refactoring.md#fixture-inheritance)\n    1. [Including files](doc/fixtures-refactoring.md#including-files)\n    1. [Variables](doc/fixtures-refactoring.md#variables)\n    1. [Parameters](doc/fixtures-refactoring.md#parameters)\n        1. [Static parameters](doc/fixtures-refactoring.md#static-parameters)\n        1. [Dynamic parameters](doc/fixtures-refactoring.md#dynamic-parameters)\n        1. [Composite parameters](doc/fixtures-refactoring.md#composite-parameters)\n        1. [Usage with functions (constructor included)](doc/fixtures-refactoring.md#usage-with-functions-constructor-included)\n        1. [Inject external parameters](doc/fixtures-refactoring.md#inject-external-parameters)\n1. [Customize Data Generation](doc/customizing-data-generation.md)\n    1. [Faker Data](doc/customizing-data-generation.md#faker-data)\n        1. [Localized Fake Data](doc/customizing-data-generation.md#localized-fake-data)\n        1. [Random data](doc/customizing-data-generation.md#random-data)\n        1. [Default Providers](doc/customizing-data-generation.md#default-providers)\n            1. [Identity](doc/customizing-data-generation.md#identity)\n            1. [Current](doc/customizing-data-generation.md#current)\n            1. [Cast](doc/customizing-data-generation.md#cast)\n    1. [Custom Faker Data Providers](doc/customizing-data-generation.md#custom-faker-data-providers)\n1. [Advanced Guide](doc/advanced-guide.md#advanced-guide)\n    1. [Performance](doc/advanced-guide.md#performance)\n    1. [Expression Language (DSL)](doc/advanced-guide.md#expression-language-dsl)\n        1. [Parameters](doc/advanced-guide.md#parameters)\n        1. [Functions](doc/advanced-guide.md#functions)\n        1. [Identity](doc/advanced-guide.md#identity)\n        1. [Arrays](doc/advanced-guide.md#arrays)\n        1. [Optional](doc/advanced-guide.md#optional)\n        1. [References](doc/advanced-guide.md#references)\n        1. [Property Reference](doc/advanced-guide.md#property-reference)\n    1. [Extending Alice](doc/advanced-guide.md#extending-alice)\n        1. [Custom Flag](doc/advanced-guide.md#custom-flag)\n        1. [Custom Instantiation](doc/advanced-guide.md#custom-instantiator)\n        1. [Custom Accessor](doc/advanced-guide.md#custom-accessor)\n1. [Third-party libraries](#third-party-libraries)\n    1. [Symfony](#symfony)\n    1. [Nette](#nette)\n    1. [Zend Framework 2](#zend-framework-2)\n    1. [Framework Agnostic](#framework-agnostic)\n1. [Contribute](CONTRIBUTING.md#contribute)\n    1. [Differences between 2.x and 3.x](CONTRIBUTING.md#differences-between-2x-and-3x)\n    1. [Architecture](CONTRIBUTING.md#architecture)\n        1. [FixtureBuilder](CONTRIBUTING.md#fixturebuilder)\n        1. [Generator](CONTRIBUTING.md#generator)\n    1. [Expression Language](CONTRIBUTING.md#expression-language)\n    1. [Contributing](CONTRIBUTING.md#contributing)\n        1. [Testing](CONTRIBUTING.md#testing)\n        1. [Profiling](CONTRIBUTING.md#profiling)\n1. [Backward Compatibility Promise (BCP)](#backward-compatibility-promise-bcp)\n1. [Upgrade](#upgrade)\n    1. [Breaking changes between Alice 2.x and 3.0](UPGRADE.md#breaking-changes-between-alice-2x-and-30)\n\n\n## Installation\n\nThis is installable via [Composer](https://getcomposer.org/) as\n[nelmio/alice](https://packagist.org/packages/nelmio/alice):\n\n    composer require --dev nelmio/alice\n\n\n## Example\n\nHere is a complete example of entity declaration:\n\n```yaml\nNelmio\\Entity\\User:\n    user{1..10}:\n        username: '\u003cusername()\u003e'\n        fullname: '\u003cfirstName()\u003e \u003clastName()\u003e'\n        birthDate: '\u003cdate_create()\u003e'\n        email: '\u003cemail()\u003e'\n        favoriteNumber: '50%? \u003cnumberBetween(1, 200)\u003e'\n\nNelmio\\Entity\\Group:\n    group1:\n        name: Admins\n        owner: '@user1'\n        members: '\u003cnumberBetween(1, 10)\u003ex @user*'\n        created: '\u003cdateTimeBetween(\"-200 days\", \"now\")\u003e'\n        updated: '\u003cdateTimeBetween($created, \"now\")\u003e'\n```\n\nYou can then load them easily with:\n\n```php\n$loader = new Nelmio\\Alice\\Loader\\NativeLoader();\n$objectSet = $loader-\u003eloadFile(__DIR__.'/fixtures.yml');\n```\n\nOr load an array right away:\n\n```php\n$loader = new Nelmio\\Alice\\Loader\\NativeLoader();\n$objectSet = $loader-\u003eloadData([\n    \\Nelmio\\Entity\\User::class =\u003e [\n        'user{1..10}' =\u003e [\n            'username' =\u003e '\u003cusername()\u003e',\n            'fullname' =\u003e '\u003cfirstName()\u003e \u003clastName()\u003e',\n            'birthDate' =\u003e '\u003cdate_create()\u003e',\n            'email' =\u003e '\u003cemail()\u003e',\n            'favoriteNumber' =\u003e '50%? \u003cnumberBetween(1, 200)\u003e',\n        ],\n    ],\n    \\Nelmio\\Entity\\Group::class =\u003e [\n        'group1' =\u003e [\n            'name' =\u003e 'Admins',\n            'owner' =\u003e '@user1',\n            'members' =\u003e '\u003cnumberBetween(1, 10)\u003ex @user*',\n            'created' =\u003e '\u003cdateTimeBetween(\"-200 days\", \"now\")\u003e',\n            'updated' =\u003e '\u003cdateTimeBetween($created, \"now\")\u003e',\n        ],\n    ],\n]);\n```\n\nFor more information, refer to [the documentation](#table-of-contents).\n\n\n## Third-party libraries\n\n### Framework Agnostic\n\n- [theofidry/AliceDataFixtures](https://github.com/theofidry/AliceDataFixtures)\n- [trappar/AliceGenerator](https://github.com/trappar/AliceGenerator)\n\n### Symfony\n\n- [hautelook/AliceBundle](https://github.com/theofidry/AliceBundle)\n\n### Nette\n\n-  [Zenify/DoctrineFixtures](https://github.com/Zenify/DoctrineFixtures)\n\n### WordPress\n\n- [rmp-up/wp-fixtures](https://github.com/rmp-up/wp-fixtures)\n\n### Zend Framework 2:\n\n- [ma-si/aist-alice-fixtures](https://github.com/ma-si/aist-alice-fixtures)\n\n\n## Contribute\n\nCheck the [contribution guide](CONTRIBUTING.md).\n\n\n## Backward Compatibility Promise (BCP)\n\nThe policy is for the major part following the same as [Symfony's one][symfony-bc-policy] with a few changes or\nhighlights:\n\n- Code marked with `@private` or `@internal` are excluded from the BCP\n- `Nelmio\\Alice\\Loader\\NativeLoader` is excluded from the BCP: as it is the no DIC solution, registring a new service\n  may require a new method, in which case your code may break if you have already declared that method. To avoid that,\n  please beware of the naming of your methods to avoid any conflicts.\n\n\n## Upgrade\n\nCheck the [upgrade guide](UPGRADE.md).\n\n\n[symfony-bc-policy]: https://symfony.com/doc/current/contributing/code/bc.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnelmio%2Falice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnelmio%2Falice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnelmio%2Falice/lists"}