We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31f74fe commit ed1a207Copy full SHA for ed1a207
src/Stubs/Doctrine/StubFilesExtensionLoader.php
@@ -5,6 +5,7 @@
5
use PHPStan\PhpDoc\StubFilesExtension;
6
use function class_exists;
7
use function dirname;
8
+use function trait_exists;
9
10
class StubFilesExtensionLoader implements StubFilesExtension
11
{
@@ -33,7 +34,10 @@ public function getFiles(): array
33
34
$path . '/EntityRepository.stub',
35
];
36
- if (class_exists('Doctrine\Bundle\DoctrineBundle\Repository\LazyServiceEntityRepository')) {
37
+ if (
38
+ trait_exists('Symfony\Component\VarExporter\LazyGhostTrait')
39
+ && class_exists('Doctrine\Bundle\DoctrineBundle\Repository\LazyServiceEntityRepository')
40
+ ) {
41
$files[] = $stubsDir . '/LazyServiceEntityRepository.stub';
42
} else {
43
$files[] = $stubsDir . '/ServiceEntityRepository.stub';
0 commit comments