Skip to content

Commit 10fd2ab

Browse files
committed
Add note about not using autoconfigure
1 parent 7253f1b commit 10fd2ab

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

service_container/service_subscribers_locators.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ count and iterate over the services of the locator::
140140
The :class:`Symfony\\Contracts\\Service\\ServiceCollectionInterface` was
141141
introduced in Symfony 7.1.
142142

143+
Without autoconfiguration
144+
~~~~~~~~~~~~~~~~~~~~~~~~~
145+
146+
If you are not using autoconfiguration you need to require either ``Psr\Container\ContainerInterface`` or ``Symfony\Contracts\Service\ServiceProviderInterface`` as a ``__construct`` argument or as a method call like ``setContainer(Psr\Container\ContainerInterface $container)``.
147+
143148
Including Services
144149
------------------
145150

0 commit comments

Comments
 (0)