Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9892599

Browse files
committed
minor #19767 [DependencyInjection] ServiceSubscriberTrait is deprecated and replaced by ServiceMethodsSubscriberTrait (GromNaN)
This PR was merged into the 7.1 branch. Discussion ---------- [DependencyInjection] `ServiceSubscriberTrait` is deprecated and replaced by `ServiceMethodsSubscriberTrait` Fix #19755 Related code change: symfony/symfony#54496 Commits ------- f17331c ServiceSubscriberTrait is deprecated and replaced by ServiceMethodsSubscriberTrait
2 parents b5f8a39 + f17331c commit 9892599

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

service_container/service_subscribers_locators.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ the following order:
859859
Service Subscriber Trait
860860
------------------------
861861

862-
The :class:`Symfony\\Contracts\\Service\\ServiceSubscriberTrait` provides an
862+
The :class:`Symfony\\Contracts\\Service\\ServiceMethodsSubscriberTrait` provides an
863863
implementation for :class:`Symfony\\Contracts\\Service\\ServiceSubscriberInterface`
864864
that looks through all methods in your class that are marked with the
865865
:class:`Symfony\\Contracts\\Service\\Attribute\\SubscribedService` attribute. It
@@ -873,12 +873,12 @@ services based on type-hinted helper methods::
873873
use Psr\Log\LoggerInterface;
874874
use Symfony\Component\Routing\RouterInterface;
875875
use Symfony\Contracts\Service\Attribute\SubscribedService;
876+
use Symfony\Contracts\Service\ServiceMethodsSubscriberTrait;
876877
use Symfony\Contracts\Service\ServiceSubscriberInterface;
877-
use Symfony\Contracts\Service\ServiceSubscriberTrait;
878878

879879
class MyService implements ServiceSubscriberInterface
880880
{
881-
use ServiceSubscriberTrait;
881+
use ServiceMethodsSubscriberTrait;
882882

883883
public function doSomething(): void
884884
{
@@ -935,12 +935,12 @@ and compose your services with them::
935935
// src/Service/MyService.php
936936
namespace App\Service;
937937

938+
use Symfony\Contracts\Service\ServiceMethodsSubscriberTrait;
938939
use Symfony\Contracts\Service\ServiceSubscriberInterface;
939-
use Symfony\Contracts\Service\ServiceSubscriberTrait;
940940

941941
class MyService implements ServiceSubscriberInterface
942942
{
943-
use ServiceSubscriberTrait, LoggerAware, RouterAware;
943+
use ServiceMethodsSubscriberTrait, LoggerAware, RouterAware;
944944

945945
public function doSomething(): void
946946
{
@@ -977,12 +977,12 @@ Here's an example::
977977
use Symfony\Component\DependencyInjection\Attribute\Target;
978978
use Symfony\Component\Routing\RouterInterface;
979979
use Symfony\Contracts\Service\Attribute\SubscribedService;
980+
use Symfony\Contracts\Service\ServiceMethodsSubscriberTrait;
980981
use Symfony\Contracts\Service\ServiceSubscriberInterface;
981-
use Symfony\Contracts\Service\ServiceSubscriberTrait;
982982

983983
class MyService implements ServiceSubscriberInterface
984984
{
985-
use ServiceSubscriberTrait;
985+
use ServiceMethodsSubscriberTrait;
986986

987987
public function doSomething(): void
988988
{

0 commit comments

Comments
 (0)