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

Seed Bundle Laravel Package

evotodi/seed-bundle

Symfony/Doctrine bundle for loading and unloading seed data before your initial production push. Define seed commands with ordering to populate tables like states or initial admin users, unlike DoctrineFixturesBundle, which targets development.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Separating reference data from test fixtures — a data-lifecycle decision, not a library choice. Most teams conflate "seed the database" with "generate fake users for tests" and end up either shipping fixture tooling into production or hand-writing SQL in a deploy runbook. This package forces the distinction to be explicit: its stated purpose is populating production-critical lookup data (states, countries, roles, permission catalogs, the first admin account), and its README deliberately positions against DoctrineFixturesBundle, which targets development. That framing is the reusable asset here, even if the code is not.
  • Build vs. buy on seeding infrastructure. The alternative to adopting is a 50–150 line custom Symfony console command plus a conventions document. The package's surface area is small — a Seed base command requiring seedName(), an optional getOrder(), and load()/unload() verbs returning exit codes — so the "buy" case rests less on code volume and more on the enforced naming convention, the ordered registry, and the glob-based selection grammar you get for free. If your team already runs Symfony console commands fluently, building is a legitimate choice and the cost is ongoing ownership of a convention, not of an algorithm.
  • Release-process and rollback design. The load/unload pair is an operational capability worth specifying: seeded data has a defined, operator-invoked inverse. That lets you decide, in the release runbook, whether seeding is a one-way forward step or a reversible one, who is authorized to run it, and whether --break (halt on first failure) becomes your deployment's fail-fast contract.
  • Selective execution as an environment-strategy lever. seed:load prod/users/* and seed:load --skip country mean a single seed corpus can serve multiple environments and tenants through naming conventions (prod:users:eu, dev:prices) rather than through separate codebases or database dumps. This is a real roadmap enabler for staging/demo tenants and regional rollouts.
  • Onboarding and demo-environment provisioning. A curated seed set lets sales, customer success, or new engineers stand up a realistic baseline — roles, plans, tax regions — without restoring a production dump. That converts an ad hoc, stale, and often privacy-sensitive process into a repeatable command.
  • Roadmap fork on multi-tenancy and localization. If new regions or tenant provisioning are on the near-term roadmap, "must this dataset exist per tenant?" becomes a provisioning step. Deciding now whether that lives in seed commands (operator-run, deploy-time) or in application-level tenant provisioning (API-driven, runtime) is an architectural decision with a long tail — and this package only supports the first.
  • Operational hygiene as an explicit cost line. The bundle ships a disableDoctrineLogging() wrapper because Doctrine logging consumes significant memory during bulk writes, and returns exit codes so failures are visible to CI and deploy tooling. Those are small details that indicate the authors targeted production use; they also become your responsibility to exercise and verify.
  • Compliance and access-governance framing. "Populate the initial admin user(s)" is, in practice, a privileged-account-creation event. Deciding that this is a seed command rather than an application feature has audit implications (who ran it, when, with what credentials, is the default password rotated) that product and security should agree on before adoption.
  • Use cases that fit cleanly: static lookup tables (countries, states, currencies), RBAC roles and permissions, plan/tier and feature-flag defaults, tax regions, initial super-admin creation, and any dataset that must exist for the application to boot correctly.

When to Consider This Package

Adopt only when all of the following hold:

  • The stack is Symfony 6+ with Doctrine ORM/DBAL. The README carries an explicit v6.0 breaking-change badge and a PHP 8+ floor; treat those as hard constraints, not suggestions. Note the version history: v6 was largely a rewrite (seeds lost the *Seed suffix requirement, seedName() became the only naming mechanism, the config file was dropped). Budget for that migration surface if you are coming from an older major.
  • You have a named, small, slow-changing dataset that must exist before first production traffic — not a large, frequently-mutated corpus.
  • You want seeding operator-invoked and explicit (a human or a deploy step runs the command) rather than automatic on every migration or application boot. This package gives you a command; it does not give you idempotency guarantees or a "run once" ledger.
  • You have read the ordering caveat and accepted it. Seeds sharing a getOrder() value load semirandomly; the README itself warns that this interacts badly with --from. In practice this means either assigning unique sequential order values or always verifying with --debug before a production run. That is a discipline cost, not a bug, but it must be owned.
  • You can tolerate a single-maintainer, low-visibility dependency. Roughly 14 stars, zero dependents, and a small codebase. The MIT license and narrow scope are the mitigations — you can vendor or fork it cheaply if it stalls. Treat the release cadence (last tagged release in early 2024, with later README updates indicating Symfony 6 dropped and Symfony 10/8-era support added) as a signal to verify the current supported Symfony range against your own version before committing.
  • You do not need Faker-driven generation, transactional fixtures, or referential dependency ordering across dozens of seeders. That is DoctrineFixturesBundle's job and the README says so.

Look elsewhere — or write the ~100 lines yourself — when:

  • You are on Laravel. This is a Symfony bundle built on Symfony Console and the Symfony DI container. Laravel ships db:seed, DatabaseSeeder, and model factories in core, so adopting this would mean importing Symfony console/DI assumptions into a Laravel app for zero functional gain. For a Laravel roadmap, the correct product decision is to formalize your existing seeders and factories, not to evaluate this package.
  • You need dependency-ordered, referentially-aware seeding at scale. The abstraction is command-shaped, not data-graph-shaped. There is no notion of "seed B requires seed A's IDs."
  • You need idempotent upserts or conflict resolution. Re-running seed:load on existing rows is your problem to solve inside load(), and the unload() example is a bare DELETE FROM user — destructive by default.
  • Your data changes frequently. That is a migration or an ETL job, not a seed.
  • Supply-chain risk is unacceptable or active maintenance is a hard requirement. No ecosystem pressure-testing, one maintainer, and an irregular release cadence make this unsuitable as load-bearing infrastructure without a fork-and-own plan.

How to Pitch It (Stakeholders)

For executives (one paragraph): Today we have no consistent, auditable way to populate production reference data — the first admin account, roles and permissions, country and state lists, plan definitions. Those steps live in tribal knowledge, wiki pages, and one-off SQL, which means every new environment is a manual, error-prone event with no defined rollback and no clear owner. This package offers a small, MIT-licensed, production-oriented way to make those datasets first-class, command-addressable artifacts: one command to load, one to unload, with explicit ordering and the ability to target a subset by environment or region. The strategic value is not the library — it is the forcing function. Adopting it means we finally draw the line between reference data that must exist for the product to work and test fixtures that must never reach production, and we assign an owner to that line. The cost is one dependency and a conventions document; the risk is low because the code is narrow enough to fork if needed, but the dependency is single-maintainer and near-zero-adoption, so we should treat it as "buy the convention, not the support contract." Recommended decision: evaluate on one service, not fleet-wide.

For engineering (summary): This is a Symfony 6+/PHP 8+ Doctrine bundle. You write a Seed subclass per dataset, declaring a static seedName() (colon-separated, mirroring console command naming) and an optional getOrder(). The bundle auto-registers two global commands (seed:load, seed:unload) plus one per seed (seed:user load|unload). Selection supports glob matching with colons and slashes interchangeable (prod/users/*, prod/**/*), plus --skip, --from, --break, and --debug. It provides disableDoctrineLogging() because Doctrine logging is memory-hungry during bulk writes, and requires load()/unload() to return exit codes so failures propagate to CI. Known sharp edges to design around: equal getOrder() values load semirandomly and interact badly with --from — assign distinct sequential orders and gate production runs on --debug. unload() is whatever you write; the documented example is an unqualified DELETE, so add guards. There is no idempotency, no dependency graph, no transaction wrapper, and no run-ledger — if you need any of those, you are building them in load().

For the product and ops leads: The pitch is a runbook change, not a codebase change. Before adopting, answer three questions in writing: (1) Which exact datasets are production-critical reference data, and which are dev fixtures? (2) Who is authorized to run seed:load against production, and is that a deploy-pipeline step or a human action? (3) What is the recovery path if a seed loads incorrectly — is unload acceptable, or do we need a backup-and-restore step? If those three answers are clear, this package is a cheap way to make the process explicit and repeatable. If they are not, adopting it will simply automate an undefined process. Also flag the privileged-account question: seeding the initial admin user means a known credential exists in source control unless you parameterize it — decide now that this is injected from a secret, and that rotation happens immediately post-deploy.

Framing to avoid: Do not position this as "a Laravel seeding package" or as a replacement for Laravel's core db:seed — it is neither, and the first engineering review will lose confidence if the proposal misstates the stack. Position it narrowly: a Symfony-native, operator-invoked, production-seeding convention, worth a scoped pilot on a single Symfony service, with a documented fork-and-own fallback given the maintenance profile.

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.
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
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource