@@ -74,7 +74,7 @@ a PSR-11 ``ContainerInterface``::
74
74
use App\CommandHandler\BarHandler;
75
75
use App\CommandHandler\FooHandler;
76
76
use Psr\Container\ContainerInterface;
77
- use Symfony\Component\DependencyInjection \ServiceSubscriberInterface;
77
+ use Symfony\Contracts\Service \ServiceSubscriberInterface;
78
78
79
79
class CommandBus implements ServiceSubscriberInterface
80
80
{
@@ -375,9 +375,8 @@ will share identical locators amongst all the services referencing them::
375
375
Service Subscriber Trait
376
376
------------------------
377
377
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 `
381
380
that looks through all methods in your class that have no arguments and a return
382
381
type. It provides a ``ServiceLocator `` for the services of those return types.
383
382
The service id is ``__METHOD__ ``. This allows you to add dependencies to your
@@ -387,9 +386,9 @@ services based on type-hinted helper methods::
387
386
namespace App\Service;
388
387
389
388
use Psr\Log\LoggerInterface;
390
- use Symfony\Component\DependencyInjection\ServiceSubscriberInterface;
391
- use Symfony\Component\DependencyInjection\ServiceSubscriberTrait;
392
389
use Symfony\Component\Routing\RouterInterface;
390
+ use Symfony\Contracts\Service\ServiceSubscriberInterface;
391
+ use Symfony\Contracts\Service\ServiceSubscriberTrait;
393
392
394
393
class MyService implements ServiceSubscriberInterface
395
394
{
@@ -444,8 +443,8 @@ and compose your services with them::
444
443
// src/Service/MyService.php
445
444
namespace App\Service;
446
445
447
- use Symfony\Component\DependencyInjection \ServiceSubscriberInterface;
448
- use Symfony\Component\DependencyInjection \ServiceSubscriberTrait;
446
+ use Symfony\Contracts\Service \ServiceSubscriberInterface;
447
+ use Symfony\Contracts\Service \ServiceSubscriberTrait;
449
448
450
449
class MyService implements ServiceSubscriberInterface
451
450
{
0 commit comments