Skip to content

Commit

Permalink
Mark some services public (#1036)
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarStark authored and kunicmarko20 committed Jun 8, 2018
1 parent 8e28ce7 commit 36780a4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/DependencyInjection/SonataUserExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ protected function aliasManagers(ContainerBuilder $container, $managerType): voi
{
$container->setAlias('sonata.user.user_manager', sprintf('sonata.user.%s.user_manager', $managerType));
$container->setAlias('sonata.user.group_manager', sprintf('sonata.user.%s.group_manager', $managerType));

// NEXT_MAJOR: call setPublic(true) directly, when dropping support for Sf 3.3
$container->getAlias('sonata.user.user_manager')->setPublic(true);
$container->getAlias('sonata.user.group_manager')->setPublic(true);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/config/admin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<argument type="service" id="translator"/>
<argument>%security.role_hierarchy.roles%</argument>
</service>
<service id="sonata.user.form.roles_matrix_type" class="Sonata\UserBundle\Form\Type\RolesMatrixType">
<service id="sonata.user.form.roles_matrix_type" class="Sonata\UserBundle\Form\Type\RolesMatrixType" public="true">
<tag name="form.type"/>
<argument type="service" id="sonata.user.matrix_roles_builder"/>
</service>
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/config/orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<argument type="service" id="fos_user.object_manager"/>
<argument>%fos_user.model.user.class%</argument>
</service>
<service id="sonata.user.manager.user" class="Sonata\UserBundle\Entity\UserManagerProxy">
<service id="sonata.user.manager.user" class="Sonata\UserBundle\Entity\UserManagerProxy" public="true">
<argument>%fos_user.model.user.class%</argument>
<argument type="service" id="doctrine"/>
<argument type="service" id="sonata.user.orm.user_manager"/>
Expand Down

0 comments on commit 36780a4

Please sign in to comment.