Skip to content

Commit f7e2ba6

Browse files
committed
Remove chain service ID logic from tests and CallableServiceLocatorPass, and simplify constructor and tag handling.
1 parent 1eabd47 commit f7e2ba6

File tree

5 files changed

+0
-23
lines changed

5 files changed

+0
-23
lines changed

src/CallableInvokerBundle.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,11 @@ public function build(ContainerBuilder $container): void
1818
$container->addCompilerPass(new CallableServiceLocatorPass(
1919
serviceId: 'callable_invoker.decorator_groups',
2020
tagName: 'callable_invoker.decorator',
21-
excludeServiceIds: ['callable_invoker.decorator'],
2221
));
2322

2423
$container->addCompilerPass(new CallableServiceLocatorPass(
2524
serviceId: 'callable_invoker.value_resolver_groups',
2625
tagName: 'callable_invoker.value_resolver',
27-
excludeServiceIds: ['callable_invoker.value_resolver'],
2826
));
2927
}
3028

src/DependecyInjection/Compiler/CallableServiceLocatorPass.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,9 @@
1313

1414
final readonly class CallableServiceLocatorPass implements CompilerPassInterface
1515
{
16-
/**
17-
* @param list<string> $excludeServiceIds
18-
*/
1916
public function __construct(
2017
private string $serviceId,
2118
private string $tagName,
22-
private array $excludeServiceIds = [],
2319
) {
2420
}
2521

@@ -44,10 +40,6 @@ private function resolveGroups(ContainerBuilder $container): array
4440
$ungrouped = [];
4541

4642
foreach ($container->findTaggedServiceIds($this->tagName) as $id => $tags) {
47-
if ($this->serviceId === $id || \in_array($id, $this->excludeServiceIds, true)) {
48-
continue;
49-
}
50-
5143
$ref = new Reference($id);
5244
$hasExplicitGroup = false;
5345
/** @var int|null $maxPriority */

tests/Unit/DependencyInjection/Compiler/AbstractGroupingPassTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
abstract class AbstractGroupingPassTest extends TestCase
1616
{
17-
abstract protected function getChainServiceId(): string;
18-
1917
abstract protected function getLocatorServiceId(): string;
2018

2119
abstract protected function getLocatorClass(): string;
@@ -263,7 +261,6 @@ private function getPass(): CompilerPassInterface
263261
return new CallableServiceLocatorPass(
264262
$this->getLocatorServiceId(),
265263
$this->getTagName(),
266-
[$this->getChainServiceId()],
267264
);
268265
}
269266
}

tests/Unit/DependencyInjection/Compiler/FunctionDecoratorPassTest.php

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

88
final class FunctionDecoratorPassTest extends AbstractGroupingPassTest
99
{
10-
protected function getChainServiceId(): string
11-
{
12-
return 'callable_invoker.decorator_chain';
13-
}
14-
1510
protected function getLocatorServiceId(): string
1611
{
1712
return 'callable_invoker.decorator_groups';

tests/Unit/DependencyInjection/Compiler/ParameterValueResolverPassTest.php

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

88
final class ParameterValueResolverPassTest extends AbstractGroupingPassTest
99
{
10-
protected function getChainServiceId(): string
11-
{
12-
return 'callable_invoker.value_resolver_chain';
13-
}
14-
1510
protected function getLocatorServiceId(): string
1611
{
1712
return 'callable_invoker.value_resolver_groups';

0 commit comments

Comments
 (0)