Hi, I'm doing a huge migration of old forked Alice/Fixture/Hautelook/Faker packages (total mess).
We use native Doctrine PHP fixtures, where we set a reference:
$this->addReference('pretty-car', $car);
We use these object further in Alice fixture, where we fetch them from database (not sure why).
I want use reference in Alice to avoid calling database, as we normally do:
App\Entity\User:
tom:
car: "@pretty-car"
But this doesn't work. Any way how to make it happen?
I've noticed there is a \Doctrine\Common\DataFixtures\ReferenceRepository that collects all references, but not sure how/where to inject it into Alice, so Alice can fetch referenced objects from there.
Thank you 🙏
Hi, I'm doing a huge migration of old forked Alice/Fixture/Hautelook/Faker packages (total mess).
We use native Doctrine PHP fixtures, where we set a reference:
We use these object further in Alice fixture, where we fetch them from database (not sure why).
I want use reference in Alice to avoid calling database, as we normally do:
But this doesn't work. Any way how to make it happen?
I've noticed there is a
\Doctrine\Common\DataFixtures\ReferenceRepositorythat collects all references, but not sure how/where to inject it into Alice, so Alice can fetch referenced objects from there.Thank you 🙏