Replace types with container access from fe72e003e. fixes #4090 (#4092)

This commit is contained in:
Alister Bulman 2020-09-01 10:37:01 +01:00 committed by GitHub
parent 7256dbe667
commit 9fb4ff339d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -26,7 +26,10 @@ final class ContainerGetToConstructorInjectionRector extends AbstractToConstruct
/**
* @var string[]
*/
private $containerAwareParentTypes = [];
private $containerAwareParentTypes = [
'Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand',
'Symfony\Bundle\FrameworkBundle\Controller\Controller',
];
public function getDefinition(): RectorDefinition
{

View File

@ -23,7 +23,10 @@ final class GetToConstructorInjectionRector extends AbstractToConstructorInjecti
/**
* @var string[]
*/
private $getMethodAwareTypes = [];
private $getMethodAwareTypes = [
'Symfony\Bundle\FrameworkBundle\Controller\Controller',
'Symfony\Bundle\FrameworkBundle\Controller\ControllerTrait',
];
public function getDefinition(): RectorDefinition
{