Skip to content

Commit 50d420b

Browse files
committed
[FrameworkBundle] Remove references to annotation_reader
1 parent 9f1398e commit 50d420b

File tree

7 files changed

+1
-82
lines changed

7 files changed

+1
-82
lines changed

DependencyInjection/Compiler/AddAnnotationsCachedReaderPass.php

Lines changed: 0 additions & 43 deletions
This file was deleted.

DependencyInjection/Compiler/UnusedTagsPass.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
class UnusedTagsPass implements CompilerPassInterface
2323
{
2424
private const KNOWN_TAGS = [
25-
'annotations.cached_reader',
2625
'asset_mapper.compiler',
2726
'asset_mapper.importmap.resolver',
2827
'assets.package',

DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,8 @@
161161
use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader;
162162
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
163163
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
164-
use Symfony\Component\Serializer\Normalizer\ProblemNormalizer;
165164
use Symfony\Component\Serializer\Normalizer\UnwrappingDenormalizer;
166165
use Symfony\Component\Serializer\Serializer;
167-
use Symfony\Component\Serializer\SerializerAwareInterface;
168166
use Symfony\Component\Stopwatch\Stopwatch;
169167
use Symfony\Component\String\LazyString;
170168
use Symfony\Component\String\Slugger\SluggerInterface;
@@ -715,7 +713,6 @@ public function load(array $configs, ContainerBuilder $container): void
715713
->addTag('routing.route_loader');
716714

717715
$container->setParameter('container.behavior_describing_tags', [
718-
'annotations.cached_reader',
719716
'container.do_not_inline',
720717
'container.service_locator',
721718
'container.service_subscriber',
@@ -1857,10 +1854,7 @@ private function registerSerializerConfiguration(array $config, ContainerBuilder
18571854
$container->removeDefinition('serializer.mapping.cache_class_metadata_factory');
18581855
}
18591856

1860-
$annotationLoader = new Definition(
1861-
AnnotationLoader::class,
1862-
[new Reference('annotation_reader', ContainerInterface::NULL_ON_INVALID_REFERENCE)]
1863-
);
1857+
$annotationLoader = new Definition(AnnotationLoader::class);
18641858

18651859
$serializerLoaders[] = $annotationLoader;
18661860
}

FrameworkBundle.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle;
1313

14-
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddAnnotationsCachedReaderPass;
1514
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddDebugLogProcessorPass;
1615
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddExpressionLanguageProvidersPass;
1716
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AssetsContextPass;
@@ -142,7 +141,6 @@ public function build(ContainerBuilder $container): void
142141
// but as late as possible to get resolved parameters
143142
$container->addCompilerPass($registerListenersPass, PassConfig::TYPE_BEFORE_REMOVING);
144143
$this->addCompilerPassIfExists($container, AddConstraintValidatorsPass::class);
145-
$container->addCompilerPass(new AddAnnotationsCachedReaderPass(), PassConfig::TYPE_AFTER_REMOVING, -255);
146144
$this->addCompilerPassIfExists($container, AddValidatorInitializersPass::class);
147145
$this->addCompilerPassIfExists($container, AddConsoleCommandPass::class, PassConfig::TYPE_BEFORE_REMOVING);
148146
// must be registered as late as possible to get access to all Twig paths registered in

Tests/DependencyInjection/FrameworkExtensionTestCase.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Psr\Cache\CacheItemPoolInterface;
1515
use Psr\Log\LoggerAwareInterface;
1616
use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
17-
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddAnnotationsCachedReaderPass;
1817
use Symfony\Bundle\FrameworkBundle\DependencyInjection\FrameworkExtension;
1918
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
2019
use Symfony\Bundle\FrameworkBundle\Tests\Fixtures\Messenger\DummyMessage;
@@ -81,7 +80,6 @@
8180
use Symfony\Component\Validator\DependencyInjection\AddConstraintValidatorsPass;
8281
use Symfony\Component\Validator\Validation;
8382
use Symfony\Component\Validator\Validator\ValidatorInterface;
84-
use Symfony\Component\Validator\ValidatorBuilder;
8583
use Symfony\Component\Webhook\Client\RequestParser;
8684
use Symfony\Component\Webhook\Controller\WebhookController;
8785
use Symfony\Component\Workflow;
@@ -2048,7 +2046,6 @@ public function testRegisterParameterCollectingBehaviorDescribingTags()
20482046

20492047
$this->assertTrue($container->hasParameter('container.behavior_describing_tags'));
20502048
$this->assertEquals([
2051-
'annotations.cached_reader',
20522049
'container.do_not_inline',
20532050
'container.service_locator',
20542051
'container.service_subscriber',
@@ -2321,7 +2318,6 @@ protected function createContainerFromFile(string $file, array $data = [], bool
23212318
}
23222319
$container->getCompilerPassConfig()->setBeforeOptimizationPasses([new LoggerPass()]);
23232320
$container->getCompilerPassConfig()->setBeforeRemovingPasses([new AddConstraintValidatorsPass(), new TranslatorPass()]);
2324-
$container->getCompilerPassConfig()->setAfterRemovingPasses([new AddAnnotationsCachedReaderPass()]);
23252321

23262322
if (!$compile) {
23272323
return $container;

Tests/Functional/Bundle/TestBundle/DependencyInjection/AnnotationReaderPass.php

Lines changed: 0 additions & 24 deletions
This file was deleted.

Tests/Functional/Bundle/TestBundle/TestBundle.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle;
1313

14-
use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\DependencyInjection\AnnotationReaderPass;
1514
use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\DependencyInjection\Config\CustomConfig;
1615
use Symfony\Component\DependencyInjection\Compiler\CheckTypeDeclarationsPass;
1716
use Symfony\Component\DependencyInjection\Compiler\PassConfig;

0 commit comments

Comments
 (0)