Skip to content

Commit 0c0b27d

Browse files
authored
Merge pull request #2560 from tarlepp/feat/data-fixture-deprecations
Feat - Added missing `$class` parameter to fixtures
2 parents 6c13766 + 5289712 commit 0c0b27d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/DataFixtures/ORM/LoadApiKeyData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ private function createApiKey(ObjectManager $manager, ?string $role = null): boo
8484

8585
if ($role !== null) {
8686
/** @var UserGroup $userGroup */
87-
$userGroup = $this->getReference('UserGroup-' . $this->rolesService->getShort($role));
87+
$userGroup = $this->getReference('UserGroup-' . $this->rolesService->getShort($role), UserGroup::class);
8888

8989
$entity->addUserGroup($userGroup);
9090

src/DataFixtures/ORM/LoadUserData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private function createUser(ObjectManager $manager, ?string $role = null): bool
9292

9393
if ($role !== null) {
9494
/** @var UserGroup $userGroup */
95-
$userGroup = $this->getReference('UserGroup-' . $this->rolesService->getShort($role));
95+
$userGroup = $this->getReference('UserGroup-' . $this->rolesService->getShort($role), UserGroup::class);
9696

9797
$entity->addUserGroup($userGroup);
9898
}

src/DataFixtures/ORM/LoadUserGroupData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function getOrder(): int
7070
private function createUserGroup(ObjectManager $manager, string $role): bool
7171
{
7272
/** @var Role $roleReference */
73-
$roleReference = $this->getReference('Role-' . $this->rolesService->getShort($role));
73+
$roleReference = $this->getReference('Role-' . $this->rolesService->getShort($role), Role::class);
7474

7575
// Create new entity
7676
$entity = new UserGroup();

0 commit comments

Comments
 (0)