- Is icanhazstring/foundry-bundle compatible with Laravel?
- No. It is a Symfony bundle built around a Bundle subclass and dependency-injection compiler passes, so it has no Laravel service provider, facade, or Eloquent integration. A Laravel application has nothing to register or boot from this package. For Laravel test data, use Eloquent model factories with Pest or PHPUnit and database transactions instead.
- What does icanhazstring/foundry-bundle actually do?
- It adds configuration nodes and compiler passes intended to auto-register or auto-tag zenstruck/foundry factory services and smooth over common wiring problems. The value is narrow and aimed at older Foundry setups where factories needed manual service configuration. Much of that behavior was later absorbed into Foundry's own bundle configuration.
- Which Symfony and PHP versions does foundry-bundle support?
- The last release was 2021-08-26, and its Composer constraints likely target PHP 7.x or 8.0 with Symfony 4 or 5. A modern stack on PHP 8.2 or 8.3 and Symfony 6 or 7 will probably need widened constraints in a fork. Check the exact composer.json before planning any adoption.
- How do I install icanhazstring/foundry-bundle?
- In a Symfony application, run composer require icanhazstring/foundry-bundle and enable the bundle in config/bundles.php. There is no Laravel package discovery or service provider, so installing it in Laravel will not register anything useful. Review the version constraints first because the package predates current Symfony and PHP releases.
- Does foundry-bundle work with zenstruck/foundry 2.x or 3.x?
- It was built for Foundry 1.x-era factory service wiring, and there is no evidence of support for Foundry 2.x or 3.x. Foundry later gained native configuration and autoconfiguration that cover much of what this bundle added. If you experiment, add conflict rules and verify that the Symfony container still compiles.
- What problems do the compiler passes in foundry-bundle solve?
- They are meant to auto-tag or register Foundry factory services and apply sensible defaults so factories do not need manual service definitions. That helps legacy Symfony apps pinned to older Foundry releases. Before adopting, compare each pass against native Foundry bundle config such as autoconfiguration and persistence reset helpers.
- Is icanhazstring/foundry-bundle actively maintained?
- No. The last release was August 2021, and the repository shows zero stars and zero dependents, which signals an unmaintained single-author artifact. MIT licensing means you can fork it, but there is no security disclosure or patch channel. Treat adoption as taking ownership of a fork.
- What are the alternatives to foundry-bundle for Symfony test fixtures?
- Use native zenstruck/foundry bundle configuration, dama/doctrine-test-bundle for database isolation, and DoctrineFixturesBundle or Alice when you need shared fixtures. If you truly need custom factory registration, write a small in-house compiler pass you control. For Laravel, the equivalent is Eloquent factories plus RefreshDatabase or DatabaseTransactions.
- Can I use foundry-bundle in production?
- It is test and development tooling, so it should be require-dev only rather than a production runtime dependency. Compiler passes execute during cache warmup, meaning a Symfony minor upgrade can break container compilation with no upstream fix. Keep it out of production builds and plan to remove it.
- How do I migrate away from foundry-bundle?
- Audit each compiler pass and document its behavior in one line. Compare that behavior with native Foundry config on your pinned version, then replace it with native configuration or roughly 20 lines of in-house PassConfig code you own. Remove the Composer dependency once container compilation and the test suite pass.