Skip to content

Commit 4661c01

Browse files
committed
extend list in GetBySymfonyStringToConstructorInjectionRector
1 parent a3253b4 commit 4661c01

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

rules/DependencyInjection/Rector/Class_/GetBySymfonyStringToConstructorInjectionRector.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,23 @@ final class GetBySymfonyStringToConstructorInjectionRector extends AbstractRecto
3131
'validator' => SymfonyClass::VALIDATOR_INTERFACE,
3232
'event_dispatcher' => SymfonyClass::EVENT_DISPATCHER_INTERFACE,
3333
'logger' => SymfonyClass::LOGGER_INTERFACE,
34-
'jms_serializer' => SymfonyClass::SERIALIZER_INTERFACE,
34+
'jms_serializer' => SymfonyClass::JMS_SERIALIZER_INTERFACE,
3535
'translator' => SymfonyClass::TRANSLATOR_INTERFACE,
36-
'session' => SymfonyClass::SESSION,
36+
'session' => SymfonyClass::SESSION_INTERFACRE,
3737
'security.token_storage' => SymfonyClass::TOKEN_STORAGE_INTERFACE,
38+
'router' => 'Symfony\Component\Routing\RouterInterface',
39+
'request_stack' => 'Symfony\Component\HttpFoundation\RequestStack',
40+
'http_kernel' => 'Symfony\Component\HttpKernel\HttpKernelInterface',
41+
'serializer' => 'Symfony\Component\Serializer\SerializerInterface',
42+
'security.authorization_checker' => 'Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface',
43+
'templating' => 'Symfony\Component\Templating\EngineInterface',
44+
'twig' => 'Twig\Environment',
45+
'doctrine' => 'Doctrine\Persistence\ManagerRegistry',
46+
'form.factory' => 'Symfony\Component\Form\FormFactoryInterface',
47+
'security.csrf.token_manager' => 'Symfony\Component\Security\Core\Authorization\CsrfTokenManagerInterface',
48+
'parameter_bag' => 'Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface',
49+
'message_bus' => 'Symfony\Component\Messenger\MessageBusInterface',
50+
'messenger.default_bus' => 'Symfony\Component\Messenger\MessageBusInterface',
3851
];
3952

4053
public function __construct(

src/Enum/SymfonyClass.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ final class SymfonyClass
4444
/**
4545
* @var string
4646
*/
47-
public const SERIALIZER_INTERFACE = 'JMS\Serializer\SerializerInterface';
47+
public const JMS_SERIALIZER_INTERFACE = 'JMS\Serializer\SerializerInterface';
4848

4949
/**
5050
* @var string
@@ -69,7 +69,7 @@ final class SymfonyClass
6969
/**
7070
* @var string
7171
*/
72-
public const SESSION = 'Symfony\Component\HttpFoundation\Session\Session';
72+
public const SESSION_INTERFACRE = 'Symfony\Component\HttpFoundation\Session\SessionInterface';
7373

7474
/**
7575
* @var string

0 commit comments

Comments
 (0)