Skip to content

Commit

Permalink
Merge pull request #1049 from alcaeus/add-registry-service-alias
Browse files Browse the repository at this point in the history
Add new service alias for manager registry
  • Loading branch information
alcaeus authored Nov 11, 2019
2 parents 8bef971 + 43a3685 commit 9d9b9fb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Repository/ServiceEntityRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* class YourEntityRepository extends ServiceEntityRepository
* {
* public function __construct(RegistryInterface $registry)
* public function __construct(Registry $registry)
* {
* parent::__construct($registry, YourEntity::class);
* }
Expand Down
1 change: 1 addition & 0 deletions Resources/config/dbal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
</service>
<service id="Doctrine\Common\Persistence\ManagerRegistry" alias="doctrine" public="false" />
<service id="Symfony\Bridge\Doctrine\RegistryInterface" alias="doctrine" public="false" />
<service id="Doctrine\Bundle\DoctrineBundle\Registry" alias="doctrine" public="false" />

<service id="doctrine.twig.doctrine_extension" class="Doctrine\Bundle\DoctrineBundle\Twig\DoctrineExtension" public="false">
<tag name="twig.extension" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

namespace Fixtures\Bundles\RepositoryServiceBundle\Repository;

use Doctrine\Bundle\DoctrineBundle\Registry;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Fixtures\Bundles\RepositoryServiceBundle\Entity\TestCustomServiceRepoEntity;
use Symfony\Bridge\Doctrine\RegistryInterface;

class TestCustomServiceRepoRepository extends ServiceEntityRepository
{
public function __construct(RegistryInterface $registry)
public function __construct(Registry $registry)
{
parent::__construct($registry, TestCustomServiceRepoEntity::class);
}
Expand Down

0 comments on commit 9d9b9fb

Please sign in to comment.