#StarshipFactory
Doctrine Inheritance #2
🏭 When using Foundry factories with Doctrine inheritance, a few tricks can help keep duplication down. Let's go!
Foundry Fixtures for Inheritance
Ok, we left off with an error when we tried to load our fixtures. Open "src/Factory/StarshipFactory"
symfonycasts.com
March 12, 2026 at 9:02 AM
We could manually set our new slug and timestamp fields but... there’s a package for that! Let’s install and configure DoctrineExtensions to set these fields automagically.
Auto Slug and Timestamps with Doctrine Extensions
We added three new fields to "Starship": "slug", "updatedAt", and "createdAt". But now our fixtures don't load! The reason is simple: all 3 fields are required in the database, but "StarshipFactory" doesn't...
buff.ly
January 7, 2025 at 9:01 AM