Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Alice Generator Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Test-data strategy: hand-authored fixtures vs. generated ones. The package answers a recurring question — "do we keep writing Alice YAML by hand, or generate it from objects we already trust?" — by making an existing object graph the source of truth for fixtures.
  • Build vs. buy for internal tooling. If the team needs an "export our entities to fixtures" utility, this is a credible starting point instead of a from-scratch serializer. Because it is MIT-licensed and small, the realistic decision is adopt-and-fork, not adopt-as-a-dependency.
  • Legacy fixture migration. Recursive conversion is the fastest path to rehydrating an old fixture set, a staging database snapshot, or a set of demo records into version-controlled Alice YAML. This is a one-time cost-saving decision, not an ongoing dependency decision.
  • Local/demo environment seeding. Generating committed, reviewable fixture files from representative objects beats ad-hoc SQL dumps for onboarding, demos, and CI determinism.
  • Ecosystem commitment: Alice vs. Laravel factories. Adopting this presupposes a decision to standardize on nelmio/alice + Doctrine. It is evidence for that architecture, and it is largely redundant if the team has already standardized on Eloquent model factories.
  • Roadmap signal, not adoption signal. The 7.44 opportunity score with a 2.48 composite and a 2019 last release reads as "the capability is underserved" — useful for prioritizing an internal fixture-export command, not for justifying a dependency.

When to Consider This Package

Consider it when all of the following hold:

  • The codebase already uses nelmio/alice for fixtures, or is actively migrating to it.
  • Domain objects are Doctrine entities (or plain objects with clean getters) — the generator walks object graphs recursively, so leaky accessors produce leaky fixtures.
  • The work is one-time or occasional (migration, bootstrap, snapshot export) rather than a long-lived runtime dependency.
  • You are on a PHP 7.x-era stack, or you have budgeted to patch compatibility yourself.
  • You accept owning the code: vendor it, pin it, and treat it as an internal tool.

Look elsewhere when:

  • The team is Laravel-native and Eloquent-first. Model factories, seeders, and fakerphp/faker already cover this ground with first-party support and no Doctrine coupling.
  • You need PHP 8.x support, active maintenance, or security responsiveness. There has been no release since February 2019 and there are zero dependent packages — no community safety net.
  • You need anonymization or PII scrubbing. The package converts objects faithfully; it does not sanitize them. Exporting production records without a separate scrubbing layer is a data-handling risk, not a feature gap.
  • You need database-scale extraction with batching, relation ordering, or referential-integrity handling — that is a custom artisan/console command, not this library.
  • You need a supported vendor relationship, SLAs, or a maintainer to escalate to.

How to Pitch It (Stakeholders)

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource