The final part of a series on migrating away from Alice/Nelmio/Hautelook/Faker fixture dependencies to plain native Doctrine fixtures. The author avoided a trap solution (migrating to Foundry) and instead built a single custom fixture-loading command that unifies both native and Alice fixtures under one ReferenceRepository. This eliminated five packages. String-based references were replaced with typed class constants enforced by PHPStan rules. Alice YAML/PHP fixture files were converted to native Doctrine PHP fixtures, leveraging Rector and GPT for bulk conversion. The result is a leaner, more maintainable setup with only doctrine/data-fixtures remaining as an external dependency.
Table of contents
"Migrate package A to package B" Trap1. One way to work with Fixtures2. References are the King3. Remove Nelmio, Hautelook, Alice and Faker dependencies4. Final Solution and RetrospectiveSort: