Skip to content

Commit fe7ab46

Browse files
committed
fix for doctrine/annotations v2 deprecations
1 parent f8019eb commit fe7ab46

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/Factory/AbstractAnnotatedFactory.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use Doctrine\Common\Annotations\AnnotationReader;
88
use Doctrine\Common\Annotations\AnnotationRegistry;
9-
use Doctrine\Common\Annotations\CachedReader;
9+
use Doctrine\Common\Annotations\PsrCachedReader;
1010
use Doctrine\Common\Annotations\Reader;
1111
use Doctrine\Common\Cache\Cache;
1212
use Psr\Container\ContainerExceptionInterface;
@@ -32,8 +32,6 @@ protected function createAnnotationReader(ContainerInterface $container): Reader
3232
return $this->annotationReader;
3333
}
3434

35-
AnnotationRegistry::registerLoader('class_exists');
36-
3735
if (! $container->has(self::CACHE_SERVICE)) {
3836
return $this->annotationReader = new AnnotationReader();
3937
} else {
@@ -46,7 +44,7 @@ protected function createAnnotationReader(ContainerInterface $container): Reader
4644
$debug = (bool) $config['debug'];
4745
}
4846
}
49-
return $this->annotationReader = new CachedReader(new AnnotationReader(), $cache, $debug);
47+
return $this->annotationReader = new PsrCachedReader(new AnnotationReader(), $cache, $debug);
5048
}
5149
}
5250
}

0 commit comments

Comments
 (0)