@@ -619,8 +619,15 @@ The tagged services can be prioritized using the ``priority`` attribute:
619619 ..code-block ::php
620620
621621 // config/services.php
622- $container->register(App\Handler\One::class)
623- ->addTag('app.handler', ['priority' => 20]);
622+ namespace Symfony\Component\DependencyInjection\Loader\Configurator;
623+
624+ return function(ContainerConfigurator $configurator) {
625+ $services = $configurator->services();
626+
627+ $services->set(App\Handler\One::class)
628+ ->tag('app.handler', ['priority' => 20])
629+ ;
630+ };
624631
625632 ..note ::
626633
@@ -664,15 +671,27 @@ If you want to have another method defining the priority, you can define it in t
664671 https://symfony.com/schema/dic/services/services-1.0.xsd" >
665672 <services >
666673 <service id =" App\HandlerCollection" >
667- <argument type =" tagged" tag =" app.handler" default_priority_method =" getPriority" />
674+ <argument type =" tagged" tag =" app.handler" default-priority-method =" getPriority" />
668675 </service >
669676 </services >
670677 </container >
671678
672679 ..code-block ::php
673680
674681 // config/services.php
682+ namespace Symfony\Component\DependencyInjection\Loader\Configurator;
683+
675684 use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
676685
677- $container->register(App\HandlerCollection::class)
678- ->addArgument(new TaggedIteratorArgument('app.handler', null, null, false, 'getPriority'));
686+ return function (ContainerConfigurator $configurator) {
687+ $services = $configurator->services();
688+
689+ // ...
690+
691+ $services->set(App\HandlerCollection::class)
692+ ->args(
693+ [
694+ new TaggedIteratorArgument('app.handler', null, null, false, 'getPriority'),
695+ ]
696+ );
697+ };