Skip to content

Commit

Permalink
[FixtureBundle] Inject the User Entity class name so the correct Repo…
Browse files Browse the repository at this point in the history
…sitory can be used (#2500)

* Bump composer branch alias for 5.4.0 development

* Inject the User Entity class name so the correct Repository can be used

* Replaced newly introduced parameter with existing '%fos_user.model.user.class%'

* fix composer

* fix styleci
  • Loading branch information
devigner authored and Devolicious committed Jul 3, 2019
1 parent f3728e7 commit 06e6bb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Kunstmaan/FixturesBundle/Builder/PageBuilder.php
Expand Up @@ -42,12 +42,13 @@ public function __construct(
ACLPermissionCreatorService $aclPermissionCreatorService,
Populator $populator,
Slugifier $slugifier,
PagesConfiguration $pagesConfiguration
PagesConfiguration $pagesConfiguration,
string $userClass
) {
$this->manager = $em;
$this->nodeRepo = $em->getRepository('KunstmaanNodeBundle:Node');
$this->nodeTranslationRepo = $em->getRepository('KunstmaanNodeBundle:NodeTranslation');
$this->userRepo = $em->getRepository('KunstmaanAdminBundle:User');
$this->userRepo = $em->getRepository($userClass);
$this->aclPermissionCreatorService = $aclPermissionCreatorService;
$this->populator = $populator;
$this->slugifier = $slugifier;
Expand Down
1 change: 1 addition & 0 deletions src/Kunstmaan/FixturesBundle/Resources/config/services.yml
Expand Up @@ -14,6 +14,7 @@ services:
- '@kunstmaan_fixtures.populator.populator'
- '@kunstmaan_utilities.slugifier'
- '@kunstmaan_node.pages_configuration'
- '%fos_user.model.user.class%'
tags:
- { name: kunstmaan_fixtures.builder, alias: PageBuilder }

Expand Down

0 comments on commit 06e6bb0

Please sign in to comment.