Skip to content

Commit

Permalink
Merge pull request #482 from olberger/patch-1
Browse files Browse the repository at this point in the history
Add 2nd parameter (class) to getReference() call
  • Loading branch information
greg0ire authored Dec 3, 2024
2 parents c85fb52 + 33bc99a commit bd59519
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit bd59519

Please sign in to comment.