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.
@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.Consider it when all of the following hold:
db:seed + RefreshDatabase, and its BDD story is Pest/PHPUnit. Only laravel-doctrine shops with Behat would overlap.Look elsewhere when:
RefreshDatabase/seeders or per-test factories instead.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.
How can I help you explore Laravel packages today?