doctrine / data-fixtures

Doctrine2 ORM Data Fixtures Extensions
http://www.doctrine-project.org
MIT License
2.77k stars 224 forks source link

Dependencies ignored with 17 fixture classes, but not with 16 #345

Closed akoebbe closed 4 years ago

akoebbe commented 4 years ago

I have this weird problem where all of my fixtures will load just fine when I have 16 or less fixture classes, but if I add a 17th class, the dependencies are not honored and I end up with a Reference to: (some_dependent_reference) does not exist error. I can remove different "leaf" fixtures to get the number down to 16 and it will work, so I don't think it's a problem with one of the fixture classes. I haven't been able to find anything like this in my searching. Any ideas?

akoebbe commented 4 years ago

I figured it out. One of my fixture classes should have be marked as implements DependentFixtureInterface but didn't. I have no idea why it works without adding the 17th file, but either way, I failed to mark it implementing the interface so the loader didn't know to treat it as such.