trappar/alice-generator
A Laravel package that generates Nelmio Alice YAML fixture files from your database, making it easy to capture realistic records for testing and seeding. It bridges Eloquent models with Alice's expressive fixture format and artisan workflows.
nelmio/alice + Doctrine. It is evidence for that architecture, and it is largely redundant if the team has already standardized on Eloquent model factories.Consider it when all of the following hold:
nelmio/alice for fixtures, or is actively migrating to it.Look elsewhere when:
fakerphp/faker already cover this ground with first-party support and no Doctrine coupling.artisan/console command, not this library.To executives: This is a small, free, MIT-licensed utility that turns existing application objects into test fixture files automatically. It is relevant only if we are standardizing our test data on the Alice/Doctrine toolchain. The strategic value is time-to-coverage for test infrastructure, not product capability. Two caveats drive the recommendation: it has not been updated since 2019 and has no downstream users, so we would adopt it as vendored source we own, and it does not anonymize data — any export of production records needs a separate scrubbing step. Recommended stance: approve as a time-boxed evaluation for a fixture-migration spike, not as a standing dependency.
To engineering: trappar/alice-generator recursively walks an object graph and emits Alice YAML — a shortcut for converting entities into fixtures, migrating legacy fixture sets, and bootstrapping demo data. It assumes Doctrine-style objects and the Alice 2.x/3.x era PHP 7 toolchain; expect to patch for PHP 8. Because it is unmaintained (last release 2019-02-19, 0 dependents, 52 stars), the plan is to fork it into tools/ behind a single console command, pin it, and add our own PII scrubbing and relation-ordering. If we are an Eloquent shop, the honest answer is that model factories already do this and we should spend the week on factory coverage instead.
How can I help you explore Laravel packages today?