i22/functional-test-bundle
i22/functional-test-bundle provides functional testing helpers for PHP applications, with utilities to bootstrap test environments and assert end-to-end behavior. It aims to reduce boilerplate when adding reliable functional coverage to your test suite.
Architecture fit — poor for a Laravel codebase. This is a Symfony bundle, not a framework-agnostic PHP library. Its integration surface is the Symfony kernel/bundle registration model (bundles.php, Bundle subclasses, container-compiled services) plus hautelook/alice-bundle, which is itself a Symfony bundle wired to Doctrine ORM. Laravel does not load Symfony bundles, and its default persistence layer is Eloquent, not Doctrine. The package is therefore not a drop-in for the target stack; the only portable assets are its patterns (declarative fixture-set loading per test, base test-case helpers, database reset strategy).
Integration feasibility — near zero as a dependency, moderate as a reference. Composer will resolve it, but nothing will bootstrap it in a Laravel app. Even in a Symfony app, it is an abstraction over WebTestCase/KernelTestCase and AliceBundle; Laravel's Illuminate\Foundation\Testing\TestCase boots a different kernel and has no equivalent lifecycle hook for it. Realistic leverage paths are: (1) treat it as a design reference for an internal Laravel fixture-loading trait, or (2) if the org runs Symfony services, evaluate it there against modern alternatives.
Technical risk — high, and mostly unmitigated.
zenstruck/foundry is the maintained, actively developed successor for exactly this problem space in Symfony. Adopting the 2019 bundle over Foundry would be a regression on every axis.Key questions to resolve before any decision.
Stack fit. Do not add this as a production or dev dependency in a Laravel project. If the organization also operates Symfony applications, scope the evaluation there — and benchmark it against zenstruck/foundry before committing, since Foundry occupies the same niche with current maintenance.
Migration path, by target framework.
LoadsFixtures trait on top of RefreshDatabase, reading YAML/JSON fixture files, hydrating through model factories and seeders. If Alice-style data definitions are genuinely valuable, use the standalone nelmio/alice core (still maintained) with a custom Eloquent persister — roughly 150–250 lines of glue, fully owned by us. This bundle is useful here only as a spec for what the trait should look like.Compatibility checks required regardless of path. Read composer.json require/require-dev verbatim: PHP floor, Symfony component versions, doctrine/orm, hautelook/alice-bundle, and PHPUnit. Any of these pinning below PHP 8.1 or PHPUnit 9 disqualifies it from a current Laravel or Symfony 6/7 codebase.
Sequencing.
Maintenance. Effectively an orphaned dependency. Every fix, PHP 8.x compatibility patch, and PHPUnit major-version adaptation becomes ours. A fork means owning CI, release cadence, and security posture for a package with no user base to share that cost.
Support. No vendor, no active issue triage, no upstream contact. Internal ownership must be named explicitly, with a defined sunset review. Absent that, the package becomes undocumented tribal knowledge.
Scaling. Functional test suites scale on two axes: fixture-load cost per test and parallel execution. Alice-driven Doctrine fixtures on large object graphs are slow; transaction-rollback isolation is faster than truncation but constrains tests that commit. For parallel runs (paratest/pest parallel), each worker needs its own database — this is a design decision the bundle cannot make for us, and it is the same decision we'd face with a self-built trait.
Failure modes to plan for.
Ramp-up. Learning the bundle's small API is inexpensive; the expensive part is the context switch to Symfony idioms for a Laravel-oriented team, and the ongoing cost of owning an unmaintained dependency. Net: low adoption cost, high total cost of ownership. Recommend the self-built Laravel trait or Foundry-on-Symfony, and treat this package as a design reference only.
How can I help you explore Laravel packages today?