8000 [DependencyInjection] Fix missing binding for ServiceCollectionInterf… · symfony/symfony@6174d09 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6174d09

Browse files
[DependencyInjection] Fix missing binding for ServiceCollectionInterface when declaring a service subscriber
1 parent 3720f4c commit 6174d09

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Symfony/Component/DependencyInjection/Compiler/RegisterServiceSubscribersPass.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use Symfony\Component\DependencyInjection\Reference;
2121
use Symfony\Component\DependencyInjection\TypedReference;
2222
use Symfony\Contracts\Service\Attribute\SubscribedService;
23+
use Symfony\Contracts\Service\ServiceCollectionInterface;
2324
use Symfony\Contracts\Service\ServiceProviderInterface;
2425
use Symfony\Contracts\Service\ServiceSubscriberInterface;
2526

@@ -134,6 +135,7 @@ protected function processValue(mixed $value, bool $isRoot = false): mixed
134135
$value->setBindings([
135136
PsrContainerInterface::class => new BoundArgument($locatorRef, false),
136137
ServiceProviderInterface::class => new BoundArgument($locatorRef, false),
138+
ServiceCollectionInterface::class => new BoundArgument($locatorRef, false),
137139
] + $value->getBindings());
138140

139141
return parent::processValue($value);

0 commit comments

Comments
 (0)
0