Skip to content

Commit ee66a12

Browse files
committed
Remove invalid scenario for retrieving services from service locator
It does not check what it should, even after removing `ServiceLocator` condition in `ContainerInterfacePrivateServiceRule` tests are green.
1 parent 4e20d2e commit ee66a12

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

tests/Rules/Symfony/ExampleController.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,4 @@ public function unknownGuardedServiceOutsideOfContext(): void
3939
$this->get('unknown');
4040
}
4141

42-
public function privateServiceFromServiceLocator(): void
43-
{
44-
$this->get('service_locator')->get('private');
45-
}
46-
4742
}

tests/Rules/Symfony/container.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,5 @@
33
<services>
44
<service id="private" class="Foo" public="false"></service>
55
<service id="public" class="Foo"></service>
6-
<service id="service_locator" class="Symfony\Component\DependencyInjection\ServiceLocator" public="true">
7-
<argument type="collection">
8-
<argument key="private" type="service" id="private"/>
9-
</argument>
10-
</service>
116
</services>
127
</container>

0 commit comments

Comments
 (0)