Thanks to visit codestin.com
Credit goes to github.com

Skip to content

stop using deprecated Doctrine persistence classes #34981

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/Symfony/Bridge/Doctrine/ManagerRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,32 @@
namespace Symfony\Bridge\Doctrine;

use Doctrine\Common\Persistence\AbstractManagerRegistry as LegacyAbstractManagerRegistry;
use Doctrine\Persistence\AbstractManagerRegistry;
use ProxyManager\Proxy\LazyLoadingInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface as SymfonyContainerInterface;

if (class_exists(AbstractManagerRegistry::class)) {
abstract class ManagerRegistry extends AbstractManagerRegistry implements ContainerAwareInterface
{
use ManagerRegistryTrait;
}
} else {
abstract class ManagerRegistry extends LegacyAbstractManagerRegistry implements ContainerAwareInterface
{
use ManagerRegistryTrait;
}
}

/**
* References Doctrine connections and entity/document managers.
*
* @author Lukas Kahwe Smith <[email protected]>
*
* @internal
*/
abstract class ManagerRegistry extends LegacyAbstractManagerRegistry implements ContainerAwareInterface
trait ManagerRegistryTrait
{
/**
* @var Container
Expand Down