@@ -604,8 +604,15 @@ The tagged services can be prioritized using the ``priority`` attribute:
604604 ..code-block ::php
605605
606606 // config/services.php
607- $container->register(App\Handler\One::class)
608- ->addTag('app.handler', ['priority' => 20]);
607+ namespace Symfony\Component\DependencyInjection\Loader\Configurator;
608+
609+ return function(ContainerConfigurator $configurator) {
610+ $services = $configurator->services();
611+
612+ $services->set(App\Handler\One::class)
613+ ->tag('app.handler', ['priority' => 20])
614+ ;
615+ };
609616
610617 ..note ::
611618
@@ -649,15 +656,27 @@ If you want to have another method defining the priority, you can define it in t
649656 https://symfony.com/schema/dic/services/services-1.0.xsd" >
650657 <services >
651658 <service id =" App\HandlerCollection" >
652- <argument type =" tagged" tag =" app.handler" default_priority_method =" getPriority" />
659+ <argument type =" tagged" tag =" app.handler" default-priority-method =" getPriority" />
653660 </service >
654661 </services >
655662 </container >
656663
657664 ..code-block ::php
658665
659666 // config/services.php
667+ namespace Symfony\Component\DependencyInjection\Loader\Configurator;
668+
660669 use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
661670
662- $container->register(App\HandlerCollection::class)
663- ->addArgument(new TaggedIteratorArgument('app.handler', null, null, false, 'getPriority'));
671+ return function (ContainerConfigurator $configurator) {
672+ $services = $configurator->services();
673+
674+ // ...
675+
676+ $services->set(App\HandlerCollection::class)
677+ ->args(
678+ [
679+ new TaggedIteratorArgument('app.handler', null, null, false, 'getPriority'),
680+ ]
681+ );
682+ };