@@ -74,7 +74,7 @@ a PSR-11 ``ContainerInterface``::
7474 use App\CommandHandler\BarHandler;
7575 use App\CommandHandler\FooHandler;
7676 use Psr\Container\ContainerInterface;
77- use Symfony\Component\DependencyInjection \ServiceSubscriberInterface;
77+ use Symfony\Contracts\Service \ServiceSubscriberInterface;
7878
7979 class CommandBus implements ServiceSubscriberInterface
8080 {
@@ -375,9 +375,8 @@ will share identical locators amongst all the services referencing them::
375375Service Subscriber Trait
376376------------------------
377377
378- The :class: `Symfony\\ Component\\ DependencyInjection\\ ServiceSubscriberTrait `
379- provides an implementation for
380- :class: `Symfony\\ Component\\ DependencyInjection\\ ServiceSubscriberInterface `
378+ The :class: `Symfony\\ Contracts\\ Service\\ ServiceSubscriberTrait ` provides an
379+ implementation for :class: `Symfony\\ Contracts\\ Service\\ ServiceSubscriberInterface `
381380that looks through all methods in your class that have no arguments and a return
382381type. It provides a ``ServiceLocator `` for the services of those return types.
383382The service id is ``__METHOD__ ``. This allows you to add dependencies to your
@@ -387,9 +386,9 @@ services based on type-hinted helper methods::
387386 namespace App\Service;
388387
389388 use Psr\Log\LoggerInterface;
390- use Symfony\Component\DependencyInjection\ServiceSubscriberInterface;
391- use Symfony\Component\DependencyInjection\ServiceSubscriberTrait;
392389 use Symfony\Component\Routing\RouterInterface;
390+ use Symfony\Contracts\Service\ServiceSubscriberInterface;
391+ use Symfony\Contracts\Service\ServiceSubscriberTrait;
393392
394393 class MyService implements ServiceSubscriberInterface
395394 {
@@ -444,8 +443,8 @@ and compose your services with them::
444443 // src/Service/MyService.php
445444 namespace App\Service;
446445
447- use Symfony\Component\DependencyInjection \ServiceSubscriberInterface;
448- use Symfony\Component\DependencyInjection \ServiceSubscriberTrait;
446+ use Symfony\Contracts\Service \ServiceSubscriberInterface;
447+ use Symfony\Contracts\Service \ServiceSubscriberTrait;
449448
450449 class MyService implements ServiceSubscriberInterface
451450 {
0 commit comments