xsolve-pl/model-factory-bundle
A Symfony bundle that brings Laravel-style model factories to PHP projects, helping you generate test data and fixtures for Doctrine entities with reusable definitions, associations, and customizable attributes.
Architecture fit
bundles.php/kernel, configuration under config/packages/*.yaml, and almost certainly service tags plus a compiler pass to collect factory classes into a registry. Laravel's service container, package discovery, and config model are different enough that "install and go" is not realistic.new-ing fixtures inline) is framework-agnostic and is the part with real value. The delivery mechanism is the part that does not fit.Integration feasibility
FactoryRegistry singleton, resolve factories through the container, autoload by namespace convention).Technical risk
| Risk | Severity | Notes |
|---|---|---|
| Framework impedance (Symfony bundle in Laravel) | High | Requires an adapter or fork; ongoing cost is yours |
| Abandonment / bus factor | High | Acquired vendor, no releases since 2023, no maintainer SLA |
| Zero dependents = zero field testing | Medium | No upstream bug reports; you are the first real user |
| Stale dependency floor | Medium | fakerphp/faker, PSR, and Symfony major-version constraints may conflict with a modern composer.json |
| Silent test-fixture drift | Medium | Factory indirection hides what a test actually constructs; weak determinism guarantees are a quality hazard |
| MIT licensing | Low | Clean; only attribution obligations |
Key questions
fakerphp/faker or doctrine/* in a way that conflicts with our lockfile?Stack fit
database/factories plus state classes — and reserve this pattern for non-Eloquent domain objects. If the organization also runs Symfony, keep the bundle on the Symfony side and share only the conceptual conventions.zenstruck/foundry (Symfony) is not usable either; the closest analogues are league/factory-muffin or a thin in-house object-mother layer. Do not force a cross-framework library where a 150-line convention would do.Migration path
repositories entry, and record the fork point in a decision record so a future port is trivial.Compatibility
composer why-not php / dependency-resolution spike before any design work. Modern PHP (8.2/8.3) against a Jan-2023 Symfony bundle targeting Symfony 5.x/6.0 is the likely failure point.Sequencing
Maintenance
Support
Scaling
Failure modes
tests/ or a dev autoload namespace.Ramp-up
How can I help you explore Laravel packages today?