Skip to content

Commit

Permalink
Merge pull request #2560 from tarlepp/feat/data-fixture-deprecations
Browse files Browse the repository at this point in the history
Feat - Added missing `$class` parameter to fixtures
  • Loading branch information
tarlepp committed Dec 7, 2023
2 parents 6c13766 + 5289712 commit 0c0b27d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/DataFixtures/ORM/LoadApiKeyData.php
Expand Up @@ -84,7 +84,7 @@ private function createApiKey(ObjectManager $manager, ?string $role = null): boo

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

$entity->addUserGroup($userGroup);

Expand Down
2 changes: 1 addition & 1 deletion src/DataFixtures/ORM/LoadUserData.php
Expand Up @@ -92,7 +92,7 @@ private function createUser(ObjectManager $manager, ?string $role = null): bool

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

$entity->addUserGroup($userGroup);
}
Expand Down
2 changes: 1 addition & 1 deletion src/DataFixtures/ORM/LoadUserGroupData.php
Expand Up @@ -70,7 +70,7 @@ public function getOrder(): int
private function createUserGroup(ObjectManager $manager, string $role): bool
{
/** @var Role $roleReference */
$roleReference = $this->getReference('Role-' . $this->rolesService->getShort($role));
$roleReference = $this->getReference('Role-' . $this->rolesService->getShort($role), Role::class);

// Create new entity
$entity = new UserGroup();
Expand Down

0 comments on commit 0c0b27d

Please sign in to comment.