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

Doctrine Data Fixtures Extension Laravel Package

behat-extension/doctrine-data-fixtures-extension

Behat extension that loads Doctrine data fixtures before scenarios, making it easy to seed database state for acceptance tests. Configure fixture paths and purgers to keep test data consistent and isolated.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Test data strategy for BDD suites: This extension wires Behat's @BeforeScenario lifecycle to Doctrine's DataFixtures loader, letting teams tag scenarios (e.g., @fixtures:users,products) and get deterministic database state per scenario. The PM decision it informs is whether acceptance tests run against realistic seeded data or against mocked repositories — a choice that materially changes confidence in checkout, pricing, and permission flows.
  • Build vs. buy for test harness plumbing: The package is roughly a few hundred lines of glue (a Behat context/service container hook plus fixture loading and purging). The real decision is "vendor a small plugin, fork it, or write ~150 lines in-house against our own kernel bootstrapper." That is a scope-and-maintenance tradeoff, not a capability decision.
  • Standardizing on Behat + Doctrine as the acceptance-test stack: Adopting this signals a commitment to Behat as the outer test loop and Doctrine as the persistence layer. Relevant for roadmap items like "regression suite runtime under 10 minutes" or "QA can author scenarios without PHP."
  • Migration sequencing: If the team is moving from Doctrine to Eloquent (Laravel) or from Behat to Pest/PHPUnit, this package is a de facto dependency that will either block the migration or be deleted during it. It should appear as a line item in that roadmap decision.
  • Not a decision driver for feature scope, pricing, or customer-facing roadmap — this is purely engineering-enablement infrastructure.

When to Consider This Package

Consider it when all of the following hold:

  • The application is Symfony-style Doctrine ORM/ODM, not Laravel/Eloquent. Despite the framing, there is no Laravel fit here: Laravel's default ORM is Eloquent, its fixture story is db:seed + RefreshDatabase, and its BDD story is Pest/PHPUnit. Only laravel-doctrine shops with Behat would overlap.
  • Behat is already the accepted acceptance-test runner and the team wants per-scenario fixture control rather than a single global seed.
  • Test datasets are small and fast to load (tens to low hundreds of rows). Fixture loading per scenario is the primary runtime cost driver.
  • The team is comfortable vendoring or forking a low-traffic dependency: 20 stars, 0 dependents, and a last release of November 2019 mean no upstream support, no security patching, and no compatibility guarantees for PHP 8.2+/Doctrine 3.

Look elsewhere when:

  • You need a maintained, supported dependency for a long-lived product — this is effectively archived. Treat it as source code you adopt, not a package you depend on.
  • Parallel test execution is required; fixture purge/load per scenario collides across workers without custom isolation work.
  • The stack is Eloquent, Pest, PHPUnit, or API-mocking-first. Use Laravel's RefreshDatabase/seeders or per-test factories instead.
  • You need large or anonymized production-shaped datasets — use a dump-restore or snapshot approach rather than per-scenario fixtures.

How to Pitch It (Stakeholders)

To executives (one paragraph): This is a small piece of test infrastructure, not a product dependency. It lets our acceptance tests load known database contents before each scenario, which makes end-to-end tests trustworthy and lets QA write readable scenarios instead of bespoke setup code. The upside is modest engineering time saved and better test realism. The risk is that the library is unmaintained — 20 GitHub stars, no downstream users, last release in 2019 — so I would not put it on a supported-dependency list. Recommendation: treat it as a spike, budget a half-day to evaluate, and if it fits, vendor the source into our repo so we own it. If we are on Laravel/Eloquent, decline — our native tooling already covers this.

To engineering (the real pitch): It saves us writing fixture-lifecycle glue for Behat + Doctrine: tag a scenario, get a purged-and-reloaded dataset, no manual doctrine:fixtures:load calls. That is maybe a day of work we don't do, and it comes with an idiom QA can learn in ten minutes. The costs are explicit: PHP 8 / Doctrine 3 compatibility is unverified, there is no maintainer, and per-scenario loading will be the slowest part of our suite. My proposal is a timeboxed spike against our current PHP and Doctrine versions; if it passes, we copy it into tests/Support under our own license header (MIT permits this) and stop tracking upstream. If it fails, we write the ~150-line equivalent ourselves — the surface area is small enough that this stays a two-day task, not a project. Either way, we should decide before the test-suite overhaul on the roadmap, because this choice constrains whether Behat survives that overhaul.

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.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core