diff --git a/src/DependencyInjection/Compiler/CacheCompilerPass.php b/src/DependencyInjection/Compiler/CacheCompilerPass.php index 82a0353..2b6701f 100644 --- a/src/DependencyInjection/Compiler/CacheCompilerPass.php +++ b/src/DependencyInjection/Compiler/CacheCompilerPass.php @@ -99,15 +99,13 @@ private function isFromIgnoredNamespace(ContainerBuilder $container, string $cla private function setCachedDefinitions(Definition $definition, ContainerBuilder $container, $serviceId): void { $annotationReader = new AnnotationReader(); - AnnotationReader::addGlobalIgnoredNamespace('required'); - AnnotationReader::addGlobalIgnoredNamespace('legacy'); $ignoreNames = $container->getParameter('annotation_cache.ignore.names'); foreach ($ignoreNames as $ignoreName) { AnnotationReader::addGlobalIgnoredName($ignoreName); } $proxyWarmupDefinition = $container->getDefinition('annotation_cache.warmup'); /** @var Reader $annotationReaderReference */ - $annotationReaderReference = new Reference("annotation_cache_reader"); + $annotationReaderReference = new Reference("annotation_cache.cache_reader"); /** @var CacheFactory $cacheProxyFactory */ $cacheProxyFactory = new Reference('annotation_cache.proxy.factory'); /** @var ServiceLocator $cacheServiceReference */ diff --git a/src/Resources/config/services.yaml b/src/Resources/config/services.yaml index efdf089..1331c82 100644 --- a/src/Resources/config/services.yaml +++ b/src/Resources/config/services.yaml @@ -10,12 +10,12 @@ parameters: annotation_cache.proxy.cache-locator.class: Symfony\Component\DependencyInjection\ServiceLocator services: - annotation_reader: + annotation_cache.annotation_reader: class: Doctrine\Common\Annotations\AnnotationReader - annotation_cache_reader: + annotation_cache.cache_reader: class: EmagTechLabs\AnnotationCacheBundle\Annotation\CacheReader arguments: - $reader: '@annotation_reader' + $reader: '@annotation_cache.annotation_reader' annotation_cache.warmup: class: '%annotation_cache.proxy.warmer.class%' calls: @@ -36,7 +36,7 @@ services: annotation_cache.proxy.generator: class: '%annotation_cache.proxy.generator.class%' calls: - - [ 'setAnnotationCacheReader', [ "@annotation_cache_reader" ] ] + - [ 'setAnnotationCacheReader', [ "@annotation_cache.cache_reader" ] ] public: false annotation_cache.proxy.config: class: '%annotation_cache.proxy.configuration.class%'