|
12 | 12 | namespace Symfony\Bundle\FrameworkBundle\DependencyInjection; |
13 | 13 |
|
14 | 14 | use Composer\InstalledVersions; |
| 15 | +use Doctrine\ORM\Mapping\Embeddable; |
| 16 | +use Doctrine\ORM\Mapping\Entity; |
| 17 | +use Doctrine\ORM\Mapping\MappedSuperclass; |
15 | 18 | use Http\Client\HttpAsyncClient; |
16 | 19 | use Http\Client\HttpClient; |
17 | 20 | use phpDocumentor\Reflection\DocBlockFactoryInterface; |
18 | 21 | use phpDocumentor\Reflection\Types\ContextFactory; |
19 | 22 | use PhpParser\Parser; |
20 | 23 | use PHPStan\PhpDocParser\Parser\PhpDocParser; |
| 24 | +use PHPUnit\Framework\TestCase; |
21 | 25 | use Psr\Cache\CacheItemPoolInterface; |
22 | 26 | use Psr\Clock\ClockInterface as PsrClockInterface; |
23 | 27 | use Psr\Container\ContainerInterface as PsrContainerInterface; |
|
57 | 61 | use Symfony\Component\DependencyInjection\Alias; |
58 | 62 | use Symfony\Component\DependencyInjection\Argument\ServiceLocatorArgument; |
59 | 63 | use Symfony\Component\DependencyInjection\ChildDefinition; |
| 64 | +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; |
60 | 65 | use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; |
61 | 66 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
62 | 67 | use Symfony\Component\DependencyInjection\ContainerInterface; |
|
117 | 122 | use Symfony\Component\Mailer\EventListener\SmimeSignedMessageListener; |
118 | 123 | use Symfony\Component\Mailer\Mailer; |
119 | 124 | use Symfony\Component\Mercure\HubRegistry; |
| 125 | +use Symfony\Component\Messenger\Attribute\AsMessage; |
120 | 126 | use Symfony\Component\Messenger\Attribute\AsMessageHandler; |
121 | 127 | use Symfony\Component\Messenger\Bridge as MessengerBridge; |
122 | 128 | use Symfony\Component\Messenger\Handler\BatchHandlerInterface; |
@@ -757,12 +763,29 @@ static function (ChildDefinition $definition, AsPeriodicTask|AsCronTask $attribu |
757 | 763 | } |
758 | 764 | ); |
759 | 765 | } |
760 | | - $container->registerAttributeForAutoconfiguration(JsonStreamable::class, static function (ChildDefinition $definition, JsonStreamable $attribute): void { |
761 | | - $definition->addTag('json_streamer.streamable', [ |
| 766 | + |
| 767 | + $container->registerForAutoconfiguration(CompilerPassInterface::class) |
| 768 | + ->addExcludeTag('container.excluded.compiler_pass'); |
| 769 | + $container->registerForAutoconfiguration(TestCase::class) |
| 770 | + ->addExcludeTag('container.excluded.test_case'); |
| 771 | + $container->registerAttributeForAutoconfiguration(AsMessage::class, static function (ChildDefinition $definition) { |
| 772 | + $definition->addExcludeTag('container.excluded.messenger.message'); |
| 773 | + }); |
| 774 | + $container->registerAttributeForAutoconfiguration(Entity::class, static function (ChildDefinition $definition) { |
| 775 | + $definition->addExcludeTag('container.excluded.doctrine.entity'); |
| 776 | + }); |
| 777 | + $container->registerAttributeForAutoconfiguration(Embeddable::class, static function (ChildDefinition $definition) { |
| 778 | + $definition->addExcludeTag('container.excluded.doctrine.embeddable'); |
| 779 | + }); |
| 780 | + $container->registerAttributeForAutoconfiguration(MappedSuperclass::class, static function (ChildDefinition $definition) { |
| 781 | + $definition->addExcludeTag('container.excluded.doctrine.mapped_superclass'); |
| 782 | + }); |
| 783 | + |
| 784 | + $container->registerAttributeForAutoconfiguration(JsonStreamable::class, static function (ChildDefinition $definition, JsonStreamable $attribute) { |
| 785 | + $definition->addExcludeTag('json_streamer.streamable', [ |
762 | 786 | 'object' => $attribute->asObject, |
763 | 787 | 'list' => $attribute->asList, |
764 | 788 | ]); |
765 | | - $definition->addTag('container.excluded'); |
766 | 789 | }); |
767 | 790 |
|
768 | 791 | if (!$container->getParameter('kernel.debug')) { |
|
0 commit comments