Skip to content

Commit 2b40bb4

Browse files
bug #34981 stop using deprecated Doctrine persistence classes (xabbuh)
This PR was merged into the 3.4 branch. Discussion ---------- stop using deprecated Doctrine persistence classes | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- 4db5f02 stop using deprecated Doctrine persistence classes
2 parents 30e6ddf + 4db5f02 commit 2b40bb4

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/Symfony/Bridge/Doctrine/ManagerRegistry.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,32 @@
1212
namespace Symfony\Bridge\Doctrine;
1313

1414
use Doctrine\Common\Persistence\AbstractManagerRegistry as LegacyAbstractManagerRegistry;
15+
use Doctrine\Persistence\AbstractManagerRegistry;
1516
use ProxyManager\Proxy\LazyLoadingInterface;
1617
use Symfony\Component\DependencyInjection\Container;
1718
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
1819
use Symfony\Component\DependencyInjection\ContainerInterface as SymfonyContainerInterface;
1920

21+
if (class_exists(AbstractManagerRegistry::class)) {
22+
abstract class ManagerRegistry extends AbstractManagerRegistry implements ContainerAwareInterface
23+
{
24+
use ManagerRegistryTrait;
25+
}
26+
} else {
27+
abstract class ManagerRegistry extends LegacyAbstractManagerRegistry implements ContainerAwareInterface
28+
{
29+
use ManagerRegistryTrait;
30+
}
31+
}
32+
2033
/**
2134
* References Doctrine connections and entity/document managers.
2235
*
2336
* @author Lukas Kahwe Smith <smith@pooteeweet.org>
37+
*
38+
* @internal
2439
*/
25-
abstract class ManagerRegistry extends LegacyAbstractManagerRegistry implements ContainerAwareInterface
40+
trait ManagerRegistryTrait
2641
{
2742
/**
2843
* @var Container

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy