mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-22 20:07:47 +00:00
Pass class as second parameter to getReference() fixture method
This commit is contained in:
@@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\MainBundle\DataFixtures\ORM;
|
||||
|
||||
use Chill\MainBundle\Entity\PermissionsGroup;
|
||||
use Chill\MainBundle\Entity\RoleScope;
|
||||
use Doctrine\Common\DataFixtures\AbstractFixture;
|
||||
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
|
||||
use Doctrine\Persistence\ObjectManager;
|
||||
@@ -59,7 +60,7 @@ class LoadPermissionsGroup extends AbstractFixture implements OrderedFixtureInte
|
||||
$permissionGroup->setName($new['name']);
|
||||
|
||||
foreach ($new['role_scopes'] as $roleScopeRef) {
|
||||
$permissionGroup->addRoleScope($this->getReference($roleScopeRef, null));
|
||||
$permissionGroup->addRoleScope($this->getReference($roleScopeRef, RoleScope::class));
|
||||
}
|
||||
|
||||
$manager->persist($permissionGroup);
|
||||
|
||||
Reference in New Issue
Block a user