Repository: symfony/symfony
File: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php (PHP)

Code before:
                        },
                    ];
                    if ($reflector instanceof \ReflectionMethod) {
                        if (isset($tagAttributes['method'])) {
                            throw new LogicException(\sprintf('"%s" attribute cannot declare a method on "%s::%s()".', $attribute::class, $reflector->class, $reflector->name));
                        }
                        $tagAttributes['method'] = $reflector->getName();
                    }
                    $definition->addTag('scheduler.task', $tagAttributes);
                }
            );
        }

        $container->registerForAutoconfiguration(CompilerPassInterface::class)
            ->addTag('container.excluded', ['source' => 'because it\'s a compiler pass']);
        $container->registerForAutoconfiguration(Constraint::class)
            ->addTag('container.excluded', ['source' => 'because it\'s a validation constraint']);
        $container->registerForAutoconfiguration(TestCase::class)
            ->addTag('container.excluded', ['source' => 'because it\'s a test case']);
        $container->registerForAutoconfiguration(\UnitEnum::class)
            ->addTag('container.excluded', ['source' => 'because it\'s an enum']);
        $container->registerAttributeForAutoconfiguration(AsMessage::class, static function (ChildDefinition $definition, AsMessage $attribute): void {
            $definition->addTag('container.excluded', ['source' => 'because it\'s a messenger message']);
            $definition->addTag('messenger.message', [
                'serializedTypeName' => $attribute->serializedTypeName,
            ]);
        });
        $container->registerAttributeForAutoconfiguration(\Attribute::class, static function (ChildDefinition $definition) {
            $definition->addTag('container.excluded', ['source' => 'because it\'s a PHP attribute']);
        });
        $container->registerAttributeForAutoconfiguration(Entity::class, static function (ChildDefinition $definition) {
            $definition->addTag('container.excluded', ['source' => 'because it\'s a Doctrine entity']);
        });
        $container->registerAttributeForAutoconfiguration(Embeddable::class, static function (ChildDefinition $definition) {
            $definition->addTag('container.excluded', ['source' => 'because it\'s a Doctrine embeddable']);
        });
        $container->registerAttributeForAutoconfiguration(MappedSuperclass::class, static function (ChildDefinition $definition) {
            $definition->addTag('container.excluded', ['source' => 'because it\'s a Doctrine mapped superclass']);
        });

        $container->registerAttributeForAutoconfiguration(JsonStreamable::class, static function (ChildDefinition $definition, JsonStreamable $attribute) {
            $definition->addTag('json_streamer.streamable', [
                'object' => $attribute->asObject,
                'list' => $attribute->asList,
            ])->addTag('container.excluded', ['source' => 'because it\'s a streamable JSON']);
        });

        if (!$container->getParameter('kernel.debug')) {
            // remove tagged iterator argument for resource checkers
            $container->getDefinition('config_cache_factory')->setArguments([]);
        }

Review comment (suggestion):
```suggestion
            $definition->addTag('messenger.message', ['serializedTypeName' => $attribute->serializedTypeName]);
```

Code after:
                        },
                    ];
                    if ($reflector instanceof \ReflectionMethod) {
                        if (isset($tagAttributes['method'])) {
                            throw new LogicException(\sprintf('"%s" attribute cannot declare a method on "%s::%s()".', $attribute::class, $reflector->class, $reflector->name));
                        }
                        $tagAttributes['method'] = $reflector->getName();
                    }
                    $definition->addTag('scheduler.task', $tagAttributes);
                }
            );
        }

        $container->registerForAutoconfiguration(CompilerPassInterface::class)
            ->addTag('container.excluded', ['source' => 'because it\'s a compiler pass']);
        $container->registerForAutoconfiguration(Constraint::class)
            ->addTag('container.excluded', ['source' => 'because it\'s a validation constraint']);
        $container->registerForAutoconfiguration(TestCase::class)
            ->addTag('container.excluded', ['source' => 'because it\'s a test case']);
        $container->registerForAutoconfiguration(\UnitEnum::class)
            ->addTag('container.excluded', ['source' => 'because it\'s an enum']);
        $container->registerAttributeForAutoconfiguration(AsMessage::class, static function (ChildDefinition $definition, AsMessage $attribute): void {
            $definition->addTag('container.excluded', ['source' => 'because it\'s a messenger message']);
            $definition->addTag('messenger.message', ['serializedTypeName' => $attribute->serializedTypeName]);
        });
        $container->registerAttributeForAutoconfiguration(\Attribute::class, static function (ChildDefinition $definition) {
            $definition->addTag('container.excluded', ['source' => 'because it\'s a PHP attribute']);
        });
        $container->registerAttributeForAutoconfiguration(Entity::class, static function (ChildDefinition $definition) {
            $definition->addTag('container.excluded', ['source' => 'because it\'s a Doctrine entity']);
        });
        $container->registerAttributeForAutoconfiguration(Embeddable::class, static function (ChildDefinition $definition) {
            $definition->addTag('container.excluded', ['source' => 'because it\'s a Doctrine embeddable']);
        });
        $container->registerAttributeForAutoconfiguration(MappedSuperclass::class, static function (ChildDefinition $definition) {
            $definition->addTag('container.excluded', ['source' => 'because it\'s a Doctrine mapped superclass']);
        });

        $container->registerAttributeForAutoconfiguration(JsonStreamable::class, static function (ChildDefinition $definition, JsonStreamable $attribute) {
            $definition->addTag('json_streamer.streamable', [
                'object' => $attribute->asObject,
                'list' => $attribute->asList,
            ])->addTag('container.excluded', ['source' => 'because it\'s a streamable JSON']);
        });

        if (!$container->getParameter('kernel.debug')) {
            // remove tagged iterator argument for resource checkers
            $container->getDefinition('config_cache_factory')->setArguments([]);
        }

        if (!$config['disallow_search_engine_index']) {