From 33bc99a7509d8687de6793dbef70fee819e84096 Mon Sep 17 00:00:00 2001 From: Olivier Berger Date: Tue, 3 Dec 2024 17:23:37 +0100 Subject: [PATCH] Add 2nd parameter (class) to getReference() call Since Doctrine data fixture v2, getReference() requires a second parameter, being the class --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 8345f25..734d6be 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -169,7 +169,7 @@ exact same object via its name. { $userGroup = new Group('administrators'); // this reference returns the User object created in UserFixtures - $userGroup->addUser($this->getReference(UserFixtures::ADMIN_USER_REFERENCE)); + $userGroup->addUser($this->getReference(UserFixtures::ADMIN_USER_REFERENCE, User::class)); $manager->persist($userGroup); $manager->flush();