|
39 | 39 | use Doctrine\Persistence\Mapping\Driver\MappingDriverChain;
|
40 | 40 | use Doctrine\Persistence\Mapping\Driver\PHPDriver;
|
41 | 41 | use Doctrine\Persistence\Mapping\Driver\StaticPHPDriver;
|
42 |
| -use Doctrine\Persistence\Reflection\RuntimeReflectionProperty; |
43 | 42 | use InvalidArgumentException;
|
44 | 43 | use LogicException;
|
45 | 44 | use Symfony\Bridge\Doctrine\Attribute\MapEntity;
|
|
65 | 64 | use Symfony\Component\Messenger\MessageBusInterface;
|
66 | 65 | use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface;
|
67 | 66 | use Symfony\Component\Validator\Mapping\Loader\LoaderInterface;
|
68 |
| -use Symfony\Component\VarExporter\LazyGhostTrait; |
| 67 | +use Symfony\Component\VarExporter\ProxyHelper; |
69 | 68 |
|
70 | 69 | use function array_intersect_key;
|
71 | 70 | use function array_keys;
|
|
77 | 76 | use function reset;
|
78 | 77 | use function sprintf;
|
79 | 78 | use function str_replace;
|
80 |
| -use function trait_exists; |
81 | 79 | use function trigger_deprecation;
|
82 | 80 |
|
83 | 81 | /**
|
@@ -559,19 +557,12 @@ protected function ormLoad(array $config, ContainerBuilder $container)
|
559 | 557 | $container->setParameter('doctrine.default_entity_manager', $config['default_entity_manager']);
|
560 | 558 |
|
561 | 559 | if ($config['enable_lazy_ghost_objects'] ?? false) {
|
562 |
| - if (! trait_exists(LazyGhostTrait::class)) { |
| 560 | + if (! class_exists(ProxyHelper::class)) { |
563 | 561 | throw new LogicException(
|
564 | 562 | 'Lazy ghost objects cannot be enabled because the "symfony/var-exporter" library'
|
565 | 563 | . ' is not installed. Please run "composer require symfony/var-exporter".',
|
566 | 564 | );
|
567 | 565 | }
|
568 |
| - |
569 |
| - if (! class_exists(RuntimeReflectionProperty::class)) { |
570 |
| - throw new LogicException( |
571 |
| - 'Lazy ghost objects cannot be enabled because the "doctrine/persistence" library' |
572 |
| - . ' version 3.1 or higher is not installed. Please run "composer update doctrine/persistence".', |
573 |
| - ); |
574 |
| - } |
575 | 566 | } elseif (! method_exists(ProxyFactory::class, 'resetUninitializedProxy')) {
|
576 | 567 | throw new LogicException(
|
577 | 568 | 'Lazy ghost objects cannot be disabled for ORM 3.',
|
|
0 commit comments