Skip to content

Commit 6a4a6ab

Browse files
committed
Replace TaggedIterator and TaggedLocator by Au*towireIterator and AutowireLocator
1 parent 754d876 commit 6a4a6ab

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

service_container/service_subscribers_locators.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ the following dependency injection attributes in the ``getSubscribedServices()``
270270
method directly:
271271

272272
* :class:`Symfony\\Component\\DependencyInjection\\Attribute\\Autowire`
273-
* :class:`Symfony\\Component\\DependencyInjection\\Attribute\\TaggedIterator`
274-
* :class:`Symfony\\Component\\DependencyInjection\\Attribute\\TaggedLocator`
273+
* :class:`Symfony\\Component\\DependencyInjection\\Attribute\\AutowireIterator`
274+
* :class:`Symfony\\Component\\DependencyInjection\\Attribute\\AutowireLocator`
275275
* :class:`Symfony\\Component\\DependencyInjection\\Attribute\\Target`
276276
* :class:`Symfony\\Component\\DependencyInjection\\Attribute\\AutowireDecorated`
277277

@@ -282,8 +282,8 @@ This is done by having ``getSubscribedServices()`` return an array of
282282
use Psr\Container\ContainerInterface;
283283
use Psr\Log\LoggerInterface;
284284
use Symfony\Component\DependencyInjection\Attribute\Autowire;
285-
use Symfony\Component\DependencyInjection\Attribute\TaggedIterator;
286-
use Symfony\Component\DependencyInjection\Attribute\TaggedLocator;
285+
use Symfony\Component\DependencyInjection\Attribute\AutowireIterator;
286+
use Symfony\Component\DependencyInjection\Attribute\TAutowireLocator;
287287
use Symfony\Component\DependencyInjection\Attribute\Target;
288288
use Symfony\Contracts\Service\Attribute\SubscribedService;
289289

@@ -299,11 +299,11 @@ This is done by having ``getSubscribedServices()`` return an array of
299299
// Target
300300
new SubscribedService('event.logger', LoggerInterface::class, attributes: new Target('eventLogger')),
301301

302-
// TaggedIterator
303-
new SubscribedService('loggers', 'iterable', attributes: new TaggedIterator('logger.tag')),
302+
// AutowireIterator
303+
new SubscribedService('loggers', 'iterable', attributes: new AutowireIterator('logger.tag')),
304304

305-
// TaggedLocator
306-
new SubscribedService('handlers', ContainerInterface::class, attributes: new TaggedLocator('handler.tag')),
305+
// AutowireLocator
306+
new SubscribedService('handlers', ContainerInterface::class, attributes: new AutowireLocator('handler.tag')),
307307
];
308308
}
309309

@@ -975,8 +975,8 @@ You can use the ``attributes`` argument of ``SubscribedService`` to add any
975975
of the following dependency injection attributes:
976976

977977
* :class:`Symfony\\Component\\DependencyInjection\\Attribute\\Autowire`
978-
* :class:`Symfony\\Component\\DependencyInjection\\Attribute\\TaggedIterator`
979-
* :class:`Symfony\\Component\\DependencyInjection\\Attribute\\TaggedLocator`
978+
* :class:`Symfony\\Component\\DependencyInjection\\Attribute\\AutowireIterator`
979+
* :class:`Symfony\\Component\\DependencyInjection\\Attribute\\AutowireLocator`
980980
* :class:`Symfony\\Component\\DependencyInjection\\Attribute\\Target`
981981
* :class:`Symfony\\Component\\DependencyInjection\\Attribute\\AutowireDecorated`
982982

service_container/tags.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ directly via PHP attributes:
750750
751751
.. note::
752752

753-
Some IDEs will show an error when using ``#[TaggedIterator]`` together
753+
Some IDEs will show an error when using ``#[AutowireIterator]`` together
754754
with the `PHP constructor promotion`_:
755755
*"Attribute cannot be applied to a property because it does not contain the 'Attribute::TARGET_PROPERTY' flag"*.
756756
The reason is that those constructor arguments are both parameters and class

0 commit comments

Comments
 (0)