|
9 | 9 | use Doctrine\ORM\Mapping\ClassMetadata; |
10 | 10 | use Doctrine\ORM\Mapping\Driver\AnnotationDriver; |
11 | 11 | use Doctrine\ORM\Mapping\Driver\AttributeDriver; |
12 | | -use Doctrine\Persistence\Mapping\ReflectionService; |
13 | | -use PHPStan\Reflection\ReflectionProvider; |
14 | 12 | use ReflectionClass; |
15 | 13 | use function class_exists; |
16 | 14 | use function count; |
|
19 | 17 | class ClassMetadataFactory extends \Doctrine\ORM\Mapping\ClassMetadataFactory |
20 | 18 | { |
21 | 19 |
|
22 | | - /** @var ReflectionProvider */ |
23 | | - private $reflectionProvider; |
24 | | - |
25 | | - /** @var bool */ |
26 | | - private $bleedingEdge; |
27 | | - |
28 | | - /** @var BetterReflectionService|null */ |
29 | | - private $reflectionService = null; |
30 | | - |
31 | | - public function __construct(ReflectionProvider $reflectionProvider, bool $bleedingEdge) |
32 | | - { |
33 | | - $this->reflectionProvider = $reflectionProvider; |
34 | | - $this->bleedingEdge = $bleedingEdge; |
35 | | - } |
36 | | - |
37 | 20 | protected function initialize(): void |
38 | 21 | { |
39 | 22 | $parentReflection = new ReflectionClass(parent::class); |
@@ -69,19 +52,6 @@ protected function initialize(): void |
69 | 52 | $targetPlatformProperty->setValue($this, $platform); |
70 | 53 | } |
71 | 54 |
|
72 | | - public function getReflectionService(): ReflectionService |
73 | | - { |
74 | | - if (!$this->bleedingEdge) { |
75 | | - return parent::getReflectionService(); |
76 | | - } |
77 | | - |
78 | | - if ($this->reflectionService === null) { |
79 | | - $this->reflectionService = new BetterReflectionService($this->reflectionProvider); |
80 | | - } |
81 | | - |
82 | | - return $this->reflectionService; |
83 | | - } |
84 | | - |
85 | 55 | /** |
86 | 56 | * @template T of object |
87 | 57 | * @param class-string<T> $className |
|
0 commit comments