Answer the question
In order to leave comments, you need to log in
How to properly load fixtures with dependencies?
public function load(ObjectManager $manager) : void
{
$category = new InvoiceCategory('BonBonSlickCat');
$vendor = new User('BonBonSlick');
$manager->persist(new Invoice(10, $category, $vendor));
$manager->flush();
}
/**
* {@inheritdoc}
*/
public function getDependencies() : array
{
return [
InvoiceCategoryFixtures::class,
];
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question