diff --git a/DoctrineBundle.php b/DoctrineBundle.php index 6725c618..9926beab 100644 --- a/DoctrineBundle.php +++ b/DoctrineBundle.php @@ -13,9 +13,9 @@ use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\RemoveProfilerControllerPass; use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\ServiceRepositoryCompilerPass; use Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\WellKnownSchemaFilterPass; -use Doctrine\Common\Util\ClassUtils; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Proxy\Autoloader; +use Doctrine\ORM\Proxy\DefaultProxyClassNameResolver; use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\DoctrineValidationPass; use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\RegisterEventListenersAndSubscribersPass; use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\RegisterUidTypePass; @@ -101,7 +101,7 @@ public function boot() $container = &$this->container; $proxyGenerator = static function ($proxyDir, $proxyNamespace, $class) use (&$container): void { - $originalClassName = ClassUtils::getRealClass($class); + $originalClassName = (new DefaultProxyClassNameResolver())->resolveClassName($class); $registry = $container->get('doctrine'); assert($registry instanceof Registry); diff --git a/composer.json b/composer.json index 6af31dc4..38692af1 100644 --- a/composer.json +++ b/composer.json @@ -48,7 +48,7 @@ "doctrine/annotations": "^1 || ^2", "doctrine/coding-standard": "^12", "doctrine/deprecations": "^1.0", - "doctrine/orm": "^2.14 || ^3.0", + "doctrine/orm": "^2.17 || ^3.0", "friendsofphp/proxy-manager-lts": "^1.0", "phpunit/phpunit": "^9.5.26", "psalm/plugin-phpunit": "^0.18.4", @@ -69,7 +69,7 @@ }, "conflict": { "doctrine/annotations": ">=3.0", - "doctrine/orm": "<2.14 || >=4.0", + "doctrine/orm": "<2.17 || >=4.0", "twig/twig": "<1.34 || >=2.0 <2.4" }, "suggest": {