mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-25 04:12:36 +00:00
Updated Rector to commit fe0f45e10f1127571424f35ec57dec52c3154a10
fe0f45e10f
add symfony sets to check in missing-in-set
This commit is contained in:
parent
3cbe9ec121
commit
e2e3e333e5
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
|
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
|||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit536c2135f804a468ecfee59c1baa719f::getLoader();
|
||||
return ComposerAutoloaderInite535d2bd7fd35a9c35c41ffd8c45e286::getLoader();
|
||||
|
|
31
vendor/composer/autoload_classmap.php
vendored
31
vendor/composer/autoload_classmap.php
vendored
|
@ -2507,6 +2507,15 @@ return array(
|
|||
'Rector\\Symfony\\Bridge\\Symfony\\ContainerServiceProvider' => $vendorDir . '/rector/rector-symfony/src/Bridge/Symfony/ContainerServiceProvider.php',
|
||||
'Rector\\Symfony\\Bridge\\Symfony\\Routing\\SymfonyRoutesProvider' => $vendorDir . '/rector/rector-symfony/src/Bridge/Symfony/Routing/SymfonyRoutesProvider.php',
|
||||
'Rector\\Symfony\\BundleClassResolver' => $vendorDir . '/rector/rector-symfony/src/BundleClassResolver.php',
|
||||
'Rector\\Symfony\\CodeQuality\\Rector\\BinaryOp\\ResponseStatusCodeRector' => $vendorDir . '/rector/rector-symfony/rules/CodeQuality/Rector/BinaryOp/ResponseStatusCodeRector.php',
|
||||
'Rector\\Symfony\\CodeQuality\\Rector\\ClassMethod\\ActionSuffixRemoverRector' => $vendorDir . '/rector/rector-symfony/rules/CodeQuality/Rector/ClassMethod/ActionSuffixRemoverRector.php',
|
||||
'Rector\\Symfony\\CodeQuality\\Rector\\ClassMethod\\ParamTypeFromRouteRequiredRegexRector' => $vendorDir . '/rector/rector-symfony/rules/CodeQuality/Rector/ClassMethod/ParamTypeFromRouteRequiredRegexRector.php',
|
||||
'Rector\\Symfony\\CodeQuality\\Rector\\ClassMethod\\RemoveUnusedRequestParamRector' => $vendorDir . '/rector/rector-symfony/rules/CodeQuality/Rector/ClassMethod/RemoveUnusedRequestParamRector.php',
|
||||
'Rector\\Symfony\\CodeQuality\\Rector\\ClassMethod\\ResponseReturnTypeControllerActionRector' => $vendorDir . '/rector/rector-symfony/rules/CodeQuality/Rector/ClassMethod/ResponseReturnTypeControllerActionRector.php',
|
||||
'Rector\\Symfony\\CodeQuality\\Rector\\ClassMethod\\TemplateAnnotationToThisRenderRector' => $vendorDir . '/rector/rector-symfony/rules/CodeQuality/Rector/ClassMethod/TemplateAnnotationToThisRenderRector.php',
|
||||
'Rector\\Symfony\\CodeQuality\\Rector\\Class_\\EventListenerToEventSubscriberRector' => $vendorDir . '/rector/rector-symfony/rules/CodeQuality/Rector/Class_/EventListenerToEventSubscriberRector.php',
|
||||
'Rector\\Symfony\\CodeQuality\\Rector\\Class_\\MakeCommandLazyRector' => $vendorDir . '/rector/rector-symfony/rules/CodeQuality/Rector/Class_/MakeCommandLazyRector.php',
|
||||
'Rector\\Symfony\\CodeQuality\\Rector\\MethodCall\\LiteralGetToRequestClassConstantRector' => $vendorDir . '/rector/rector-symfony/rules/CodeQuality/Rector/MethodCall/LiteralGetToRequestClassConstantRector.php',
|
||||
'Rector\\Symfony\\Contract\\Bridge\\Symfony\\Routing\\SymfonyRoutesProviderInterface' => $vendorDir . '/rector/rector-symfony/src/Contract/Bridge/Symfony/Routing/SymfonyRoutesProviderInterface.php',
|
||||
'Rector\\Symfony\\Contract\\EventReferenceToMethodNameInterface' => $vendorDir . '/rector/rector-symfony/src/Contract/EventReferenceToMethodNameInterface.php',
|
||||
'Rector\\Symfony\\Contract\\Tag\\TagInterface' => $vendorDir . '/rector/rector-symfony/src/Contract/Tag/TagInterface.php',
|
||||
|
@ -2515,11 +2524,11 @@ return array(
|
|||
'Rector\\Symfony\\Enum\\SensioAttribute' => $vendorDir . '/rector/rector-symfony/src/Enum/SensioAttribute.php',
|
||||
'Rector\\Symfony\\Enum\\SymfonyAnnotation' => $vendorDir . '/rector/rector-symfony/src/Enum/SymfonyAnnotation.php',
|
||||
'Rector\\Symfony\\Enum\\SymfonyClass' => $vendorDir . '/rector/rector-symfony/src/Enum/SymfonyClass.php',
|
||||
'Rector\\Symfony\\Exception\\InvalidConfigurationException' => $vendorDir . '/rector/rector-symfony/src/Exception/InvalidConfigurationException.php',
|
||||
'Rector\\Symfony\\Exception\\XmlContainerNotExistsException' => $vendorDir . '/rector/rector-symfony/src/Exception/XmlContainerNotExistsException.php',
|
||||
'Rector\\Symfony\\FormHelper\\FormTypeStringToTypeProvider' => $vendorDir . '/rector/rector-symfony/src/FormHelper/FormTypeStringToTypeProvider.php',
|
||||
'Rector\\Symfony\\Helper\\MessengerHelper' => $vendorDir . '/rector/rector-symfony/src/Helper/MessengerHelper.php',
|
||||
'Rector\\Symfony\\Helper\\TemplateGuesser' => $vendorDir . '/rector/rector-symfony/src/Helper/TemplateGuesser.php',
|
||||
'Rector\\Symfony\\MinimalSharedStringSolver' => $vendorDir . '/rector/rector-symfony/src/MinimalSharedStringSolver.php',
|
||||
'Rector\\Symfony\\NodeAnalyzer\\Annotations\\ClassAnnotationAssertResolver' => $vendorDir . '/rector/rector-symfony/src/NodeAnalyzer/Annotations/ClassAnnotationAssertResolver.php',
|
||||
'Rector\\Symfony\\NodeAnalyzer\\Annotations\\MethodCallAnnotationAssertResolver' => $vendorDir . '/rector/rector-symfony/src/NodeAnalyzer/Annotations/MethodCallAnnotationAssertResolver.php',
|
||||
'Rector\\Symfony\\NodeAnalyzer\\Annotations\\PropertyAnnotationAssertResolver' => $vendorDir . '/rector/rector-symfony/src/NodeAnalyzer/Annotations/PropertyAnnotationAssertResolver.php',
|
||||
|
@ -2556,36 +2565,20 @@ return array(
|
|||
'Rector\\Symfony\\NodeManipulator\\ClassManipulator' => $vendorDir . '/rector/rector-symfony/src/NodeManipulator/ClassManipulator.php',
|
||||
'Rector\\Symfony\\NodeRemover\\ConstructorDependencyRemover' => $vendorDir . '/rector/rector-symfony/src/NodeRemover/ConstructorDependencyRemover.php',
|
||||
'Rector\\Symfony\\PhpDocNode\\SymfonyRouteTagValueNodeFactory' => $vendorDir . '/rector/rector-symfony/src/PhpDocNode/SymfonyRouteTagValueNodeFactory.php',
|
||||
'Rector\\Symfony\\Rector\\BinaryOp\\ResponseStatusCodeRector' => $vendorDir . '/rector/rector-symfony/src/Rector/BinaryOp/ResponseStatusCodeRector.php',
|
||||
'Rector\\Symfony\\Rector\\ClassMethod\\ActionSuffixRemoverRector' => $vendorDir . '/rector/rector-symfony/src/Rector/ClassMethod/ActionSuffixRemoverRector.php',
|
||||
'Rector\\Symfony\\Rector\\ClassMethod\\AddRouteAnnotationRector' => $vendorDir . '/rector/rector-symfony/src/Rector/ClassMethod/AddRouteAnnotationRector.php',
|
||||
'Rector\\Symfony\\Rector\\ClassMethod\\ParamTypeFromRouteRequiredRegexRector' => $vendorDir . '/rector/rector-symfony/src/Rector/ClassMethod/ParamTypeFromRouteRequiredRegexRector.php',
|
||||
'Rector\\Symfony\\Rector\\ClassMethod\\RemoveServiceFromSensioRouteRector' => $vendorDir . '/rector/rector-symfony/src/Rector/ClassMethod/RemoveServiceFromSensioRouteRector.php',
|
||||
'Rector\\Symfony\\Rector\\ClassMethod\\RemoveUnusedRequestParamRector' => $vendorDir . '/rector/rector-symfony/src/Rector/ClassMethod/RemoveUnusedRequestParamRector.php',
|
||||
'Rector\\Symfony\\Rector\\ClassMethod\\ReplaceSensioRouteAnnotationWithSymfonyRector' => $vendorDir . '/rector/rector-symfony/src/Rector/ClassMethod/ReplaceSensioRouteAnnotationWithSymfonyRector.php',
|
||||
'Rector\\Symfony\\Rector\\ClassMethod\\ResponseReturnTypeControllerActionRector' => $vendorDir . '/rector/rector-symfony/src/Rector/ClassMethod/ResponseReturnTypeControllerActionRector.php',
|
||||
'Rector\\Symfony\\Rector\\ClassMethod\\TemplateAnnotationToThisRenderRector' => $vendorDir . '/rector/rector-symfony/src/Rector/ClassMethod/TemplateAnnotationToThisRenderRector.php',
|
||||
'Rector\\Symfony\\Rector\\Class_\\ChangeFileLoaderInExtensionAndKernelRector' => $vendorDir . '/rector/rector-symfony/src/Rector/Class_/ChangeFileLoaderInExtensionAndKernelRector.php',
|
||||
'Rector\\Symfony\\Rector\\Class_\\ContainerGetToRequiredDependencyAbstractClassRector' => $vendorDir . '/rector/rector-symfony/src/Rector/Class_/ContainerGetToRequiredDependencyAbstractClassRector.php',
|
||||
'Rector\\Symfony\\Rector\\Class_\\EventListenerToEventSubscriberRector' => $vendorDir . '/rector/rector-symfony/src/Rector/Class_/EventListenerToEventSubscriberRector.php',
|
||||
'Rector\\Symfony\\Rector\\Class_\\FormTypeWithDependencyToOptionsRector' => $vendorDir . '/rector/rector-symfony/src/Rector/Class_/FormTypeWithDependencyToOptionsRector.php',
|
||||
'Rector\\Symfony\\Rector\\Class_\\LoadValidatorMetadataToAnnotationRector' => $vendorDir . '/rector/rector-symfony/src/Rector/Class_/LoadValidatorMetadataToAnnotationRector.php',
|
||||
'Rector\\Symfony\\Rector\\Class_\\MagicClosureTwigExtensionToNativeMethodsRector' => $vendorDir . '/rector/rector-symfony/src/Rector/Class_/MagicClosureTwigExtensionToNativeMethodsRector.php',
|
||||
'Rector\\Symfony\\Rector\\Class_\\MakeCommandLazyRector' => $vendorDir . '/rector/rector-symfony/src/Rector/Class_/MakeCommandLazyRector.php',
|
||||
'Rector\\Symfony\\Rector\\Closure\\ContainerGetNameToTypeInTestsRector' => $vendorDir . '/rector/rector-symfony/src/Rector/Closure/ContainerGetNameToTypeInTestsRector.php',
|
||||
'Rector\\Symfony\\Rector\\Closure\\MinimalSharedStringSolver' => $vendorDir . '/rector/rector-symfony/src/Rector/Closure/MinimalSharedStringSolver.php',
|
||||
'Rector\\Symfony\\Rector\\Closure\\ServiceArgsToServiceNamedArgRector' => $vendorDir . '/rector/rector-symfony/src/Rector/Closure/ServiceArgsToServiceNamedArgRector.php',
|
||||
'Rector\\Symfony\\Rector\\Closure\\ServiceSetStringNameToClassNameRector' => $vendorDir . '/rector/rector-symfony/src/Rector/Closure/ServiceSetStringNameToClassNameRector.php',
|
||||
'Rector\\Symfony\\Rector\\Closure\\ServiceSettersToSettersAutodiscoveryRector' => $vendorDir . '/rector/rector-symfony/src/Rector/Closure/ServiceSettersToSettersAutodiscoveryRector.php',
|
||||
'Rector\\Symfony\\Rector\\Closure\\ServiceTagsToDefaultsAutoconfigureRector' => $vendorDir . '/rector/rector-symfony/src/Rector/Closure/ServiceTagsToDefaultsAutoconfigureRector.php',
|
||||
'Rector\\Symfony\\Rector\\Closure\\ServicesSetNameToSetTypeRector' => $vendorDir . '/rector/rector-symfony/src/Rector/Closure/ServicesSetNameToSetTypeRector.php',
|
||||
'Rector\\Symfony\\Rector\\MethodCall\\GetToConstructorInjectionRector' => $vendorDir . '/rector/rector-symfony/src/Rector/MethodCall/GetToConstructorInjectionRector.php',
|
||||
'Rector\\Symfony\\Rector\\MethodCall\\LiteralGetToRequestClassConstantRector' => $vendorDir . '/rector/rector-symfony/src/Rector/MethodCall/LiteralGetToRequestClassConstantRector.php',
|
||||
'Rector\\Symfony\\Rector\\MethodCall\\SwiftCreateMessageToNewEmailRector' => $vendorDir . '/rector/rector-symfony/src/Rector/MethodCall/SwiftCreateMessageToNewEmailRector.php',
|
||||
'Rector\\Symfony\\Rector\\MethodCall\\SwiftSetBodyToHtmlPlainMethodCallRector' => $vendorDir . '/rector/rector-symfony/src/Rector/MethodCall/SwiftSetBodyToHtmlPlainMethodCallRector.php',
|
||||
'Rector\\Symfony\\Rector\\MethodCall\\WebTestCaseAssertSelectorTextContainsRector' => $vendorDir . '/rector/rector-symfony/src/Rector/MethodCall/WebTestCaseAssertSelectorTextContainsRector.php',
|
||||
'Rector\\Symfony\\Rector\\Return_\\SimpleFunctionAndFilterRector' => $vendorDir . '/rector/rector-symfony/src/Rector/Return_/SimpleFunctionAndFilterRector.php',
|
||||
'Rector\\Symfony\\Rector\\StaticCall\\AddMessageToEqualsResponseCodeRector' => $vendorDir . '/rector/rector-symfony/src/Rector/StaticCall/AddMessageToEqualsResponseCodeRector.php',
|
||||
'Rector\\Symfony\\Set\\FOSRestSetList' => $vendorDir . '/rector/rector-symfony/src/Set/FOSRestSetList.php',
|
||||
'Rector\\Symfony\\Set\\JMSSetList' => $vendorDir . '/rector/rector-symfony/src/Set/JMSSetList.php',
|
||||
'Rector\\Symfony\\Set\\SensiolabsSetList' => $vendorDir . '/rector/rector-symfony/src/Set/SensiolabsSetList.php',
|
||||
|
@ -2609,6 +2602,8 @@ return array(
|
|||
'Rector\\Symfony\\Symfony30\\Rector\\MethodCall\\StringFormTypeToClassRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony30/Rector/MethodCall/StringFormTypeToClassRector.php',
|
||||
'Rector\\Symfony\\Symfony33\\Rector\\ClassConstFetch\\ConsoleExceptionToErrorEventConstantRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony33/Rector/ClassConstFetch/ConsoleExceptionToErrorEventConstantRector.php',
|
||||
'Rector\\Symfony\\Symfony34\\Rector\\ClassMethod\\MergeMethodAnnotationToRouteAnnotationRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony34/Rector/ClassMethod/MergeMethodAnnotationToRouteAnnotationRector.php',
|
||||
'Rector\\Symfony\\Symfony34\\Rector\\ClassMethod\\RemoveServiceFromSensioRouteRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony34/Rector/ClassMethod/RemoveServiceFromSensioRouteRector.php',
|
||||
'Rector\\Symfony\\Symfony34\\Rector\\ClassMethod\\ReplaceSensioRouteAnnotationWithSymfonyRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony34/Rector/ClassMethod/ReplaceSensioRouteAnnotationWithSymfonyRector.php',
|
||||
'Rector\\Symfony\\Symfony40\\Rector\\ConstFetch\\ConstraintUrlOptionRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony40/Rector/ConstFetch/ConstraintUrlOptionRector.php',
|
||||
'Rector\\Symfony\\Symfony40\\Rector\\MethodCall\\ContainerBuilderCompileEnvArgumentRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony40/Rector/MethodCall/ContainerBuilderCompileEnvArgumentRector.php',
|
||||
'Rector\\Symfony\\Symfony40\\Rector\\MethodCall\\FormIsValidRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony40/Rector/MethodCall/FormIsValidRector.php',
|
||||
|
@ -2624,6 +2619,7 @@ return array(
|
|||
'Rector\\Symfony\\Symfony43\\Rector\\MethodCall\\MakeDispatchFirstArgumentEventRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony43/Rector/MethodCall/MakeDispatchFirstArgumentEventRector.php',
|
||||
'Rector\\Symfony\\Symfony43\\Rector\\MethodCall\\WebTestCaseAssertIsSuccessfulRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony43/Rector/MethodCall/WebTestCaseAssertIsSuccessfulRector.php',
|
||||
'Rector\\Symfony\\Symfony43\\Rector\\MethodCall\\WebTestCaseAssertResponseCodeRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony43/Rector/MethodCall/WebTestCaseAssertResponseCodeRector.php',
|
||||
'Rector\\Symfony\\Symfony43\\Rector\\MethodCall\\WebTestCaseAssertSelectorTextContainsRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony43/Rector/MethodCall/WebTestCaseAssertSelectorTextContainsRector.php',
|
||||
'Rector\\Symfony\\Symfony43\\Rector\\StmtsAwareInterface\\TwigBundleFilesystemLoaderToTwigRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony43/Rector/StmtsAwareInterface/TwigBundleFilesystemLoaderToTwigRector.php',
|
||||
'Rector\\Symfony\\Symfony44\\Rector\\ClassMethod\\ConsoleExecuteReturnIntRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector.php',
|
||||
'Rector\\Symfony\\Symfony44\\Rector\\MethodCall\\AuthorizationCheckerIsGrantedExtractorRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony44/Rector/MethodCall/AuthorizationCheckerIsGrantedExtractorRector.php',
|
||||
|
@ -2643,6 +2639,7 @@ return array(
|
|||
'Rector\\Symfony\\Symfony60\\Rector\\FuncCall\\ReplaceServiceArgumentRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony60/Rector/FuncCall/ReplaceServiceArgumentRector.php',
|
||||
'Rector\\Symfony\\Symfony60\\Rector\\MethodCall\\GetHelperControllerToServiceRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony60/Rector/MethodCall/GetHelperControllerToServiceRector.php',
|
||||
'Rector\\Symfony\\Symfony61\\Rector\\Class_\\CommandPropertyToAttributeRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony61/Rector/Class_/CommandPropertyToAttributeRector.php',
|
||||
'Rector\\Symfony\\Symfony61\\Rector\\Class_\\MagicClosureTwigExtensionToNativeMethodsRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony61/Rector/Class_/MagicClosureTwigExtensionToNativeMethodsRector.php',
|
||||
'Rector\\Symfony\\Symfony61\\Rector\\StaticPropertyFetch\\ErrorNamesPropertyToConstantRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony61/Rector/StaticPropertyFetch/ErrorNamesPropertyToConstantRector.php',
|
||||
'Rector\\Symfony\\Symfony62\\Rector\\ClassMethod\\ParamConverterAttributeToMapEntityAttributeRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony62/Rector/ClassMethod/ParamConverterAttributeToMapEntityAttributeRector.php',
|
||||
'Rector\\Symfony\\Symfony62\\Rector\\Class_\\MessageHandlerInterfaceToAttributeRector' => $vendorDir . '/rector/rector-symfony/rules/Symfony62/Rector/Class_/MessageHandlerInterfaceToAttributeRector.php',
|
||||
|
|
10
vendor/composer/autoload_real.php
vendored
10
vendor/composer/autoload_real.php
vendored
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit536c2135f804a468ecfee59c1baa719f
|
||||
class ComposerAutoloaderInite535d2bd7fd35a9c35c41ffd8c45e286
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,17 +22,17 @@ class ComposerAutoloaderInit536c2135f804a468ecfee59c1baa719f
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit536c2135f804a468ecfee59c1baa719f', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInite535d2bd7fd35a9c35c41ffd8c45e286', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit536c2135f804a468ecfee59c1baa719f', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInite535d2bd7fd35a9c35c41ffd8c45e286', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit536c2135f804a468ecfee59c1baa719f::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInite535d2bd7fd35a9c35c41ffd8c45e286::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit536c2135f804a468ecfee59c1baa719f::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInite535d2bd7fd35a9c35c41ffd8c45e286::$files;
|
||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
|
39
vendor/composer/autoload_static.php
vendored
39
vendor/composer/autoload_static.php
vendored
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit536c2135f804a468ecfee59c1baa719f
|
||||
class ComposerStaticInite535d2bd7fd35a9c35c41ffd8c45e286
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
|
@ -2759,6 +2759,15 @@ class ComposerStaticInit536c2135f804a468ecfee59c1baa719f
|
|||
'Rector\\Symfony\\Bridge\\Symfony\\ContainerServiceProvider' => __DIR__ . '/..' . '/rector/rector-symfony/src/Bridge/Symfony/ContainerServiceProvider.php',
|
||||
'Rector\\Symfony\\Bridge\\Symfony\\Routing\\SymfonyRoutesProvider' => __DIR__ . '/..' . '/rector/rector-symfony/src/Bridge/Symfony/Routing/SymfonyRoutesProvider.php',
|
||||
'Rector\\Symfony\\BundleClassResolver' => __DIR__ . '/..' . '/rector/rector-symfony/src/BundleClassResolver.php',
|
||||
'Rector\\Symfony\\CodeQuality\\Rector\\BinaryOp\\ResponseStatusCodeRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/CodeQuality/Rector/BinaryOp/ResponseStatusCodeRector.php',
|
||||
'Rector\\Symfony\\CodeQuality\\Rector\\ClassMethod\\ActionSuffixRemoverRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/CodeQuality/Rector/ClassMethod/ActionSuffixRemoverRector.php',
|
||||
'Rector\\Symfony\\CodeQuality\\Rector\\ClassMethod\\ParamTypeFromRouteRequiredRegexRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/CodeQuality/Rector/ClassMethod/ParamTypeFromRouteRequiredRegexRector.php',
|
||||
'Rector\\Symfony\\CodeQuality\\Rector\\ClassMethod\\RemoveUnusedRequestParamRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/CodeQuality/Rector/ClassMethod/RemoveUnusedRequestParamRector.php',
|
||||
'Rector\\Symfony\\CodeQuality\\Rector\\ClassMethod\\ResponseReturnTypeControllerActionRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/CodeQuality/Rector/ClassMethod/ResponseReturnTypeControllerActionRector.php',
|
||||
'Rector\\Symfony\\CodeQuality\\Rector\\ClassMethod\\TemplateAnnotationToThisRenderRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/CodeQuality/Rector/ClassMethod/TemplateAnnotationToThisRenderRector.php',
|
||||
'Rector\\Symfony\\CodeQuality\\Rector\\Class_\\EventListenerToEventSubscriberRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/CodeQuality/Rector/Class_/EventListenerToEventSubscriberRector.php',
|
||||
'Rector\\Symfony\\CodeQuality\\Rector\\Class_\\MakeCommandLazyRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/CodeQuality/Rector/Class_/MakeCommandLazyRector.php',
|
||||
'Rector\\Symfony\\CodeQuality\\Rector\\MethodCall\\LiteralGetToRequestClassConstantRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/CodeQuality/Rector/MethodCall/LiteralGetToRequestClassConstantRector.php',
|
||||
'Rector\\Symfony\\Contract\\Bridge\\Symfony\\Routing\\SymfonyRoutesProviderInterface' => __DIR__ . '/..' . '/rector/rector-symfony/src/Contract/Bridge/Symfony/Routing/SymfonyRoutesProviderInterface.php',
|
||||
'Rector\\Symfony\\Contract\\EventReferenceToMethodNameInterface' => __DIR__ . '/..' . '/rector/rector-symfony/src/Contract/EventReferenceToMethodNameInterface.php',
|
||||
'Rector\\Symfony\\Contract\\Tag\\TagInterface' => __DIR__ . '/..' . '/rector/rector-symfony/src/Contract/Tag/TagInterface.php',
|
||||
|
@ -2767,11 +2776,11 @@ class ComposerStaticInit536c2135f804a468ecfee59c1baa719f
|
|||
'Rector\\Symfony\\Enum\\SensioAttribute' => __DIR__ . '/..' . '/rector/rector-symfony/src/Enum/SensioAttribute.php',
|
||||
'Rector\\Symfony\\Enum\\SymfonyAnnotation' => __DIR__ . '/..' . '/rector/rector-symfony/src/Enum/SymfonyAnnotation.php',
|
||||
'Rector\\Symfony\\Enum\\SymfonyClass' => __DIR__ . '/..' . '/rector/rector-symfony/src/Enum/SymfonyClass.php',
|
||||
'Rector\\Symfony\\Exception\\InvalidConfigurationException' => __DIR__ . '/..' . '/rector/rector-symfony/src/Exception/InvalidConfigurationException.php',
|
||||
'Rector\\Symfony\\Exception\\XmlContainerNotExistsException' => __DIR__ . '/..' . '/rector/rector-symfony/src/Exception/XmlContainerNotExistsException.php',
|
||||
'Rector\\Symfony\\FormHelper\\FormTypeStringToTypeProvider' => __DIR__ . '/..' . '/rector/rector-symfony/src/FormHelper/FormTypeStringToTypeProvider.php',
|
||||
'Rector\\Symfony\\Helper\\MessengerHelper' => __DIR__ . '/..' . '/rector/rector-symfony/src/Helper/MessengerHelper.php',
|
||||
'Rector\\Symfony\\Helper\\TemplateGuesser' => __DIR__ . '/..' . '/rector/rector-symfony/src/Helper/TemplateGuesser.php',
|
||||
'Rector\\Symfony\\MinimalSharedStringSolver' => __DIR__ . '/..' . '/rector/rector-symfony/src/MinimalSharedStringSolver.php',
|
||||
'Rector\\Symfony\\NodeAnalyzer\\Annotations\\ClassAnnotationAssertResolver' => __DIR__ . '/..' . '/rector/rector-symfony/src/NodeAnalyzer/Annotations/ClassAnnotationAssertResolver.php',
|
||||
'Rector\\Symfony\\NodeAnalyzer\\Annotations\\MethodCallAnnotationAssertResolver' => __DIR__ . '/..' . '/rector/rector-symfony/src/NodeAnalyzer/Annotations/MethodCallAnnotationAssertResolver.php',
|
||||
'Rector\\Symfony\\NodeAnalyzer\\Annotations\\PropertyAnnotationAssertResolver' => __DIR__ . '/..' . '/rector/rector-symfony/src/NodeAnalyzer/Annotations/PropertyAnnotationAssertResolver.php',
|
||||
|
@ -2808,36 +2817,20 @@ class ComposerStaticInit536c2135f804a468ecfee59c1baa719f
|
|||
'Rector\\Symfony\\NodeManipulator\\ClassManipulator' => __DIR__ . '/..' . '/rector/rector-symfony/src/NodeManipulator/ClassManipulator.php',
|
||||
'Rector\\Symfony\\NodeRemover\\ConstructorDependencyRemover' => __DIR__ . '/..' . '/rector/rector-symfony/src/NodeRemover/ConstructorDependencyRemover.php',
|
||||
'Rector\\Symfony\\PhpDocNode\\SymfonyRouteTagValueNodeFactory' => __DIR__ . '/..' . '/rector/rector-symfony/src/PhpDocNode/SymfonyRouteTagValueNodeFactory.php',
|
||||
'Rector\\Symfony\\Rector\\BinaryOp\\ResponseStatusCodeRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/BinaryOp/ResponseStatusCodeRector.php',
|
||||
'Rector\\Symfony\\Rector\\ClassMethod\\ActionSuffixRemoverRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/ClassMethod/ActionSuffixRemoverRector.php',
|
||||
'Rector\\Symfony\\Rector\\ClassMethod\\AddRouteAnnotationRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/ClassMethod/AddRouteAnnotationRector.php',
|
||||
'Rector\\Symfony\\Rector\\ClassMethod\\ParamTypeFromRouteRequiredRegexRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/ClassMethod/ParamTypeFromRouteRequiredRegexRector.php',
|
||||
'Rector\\Symfony\\Rector\\ClassMethod\\RemoveServiceFromSensioRouteRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/ClassMethod/RemoveServiceFromSensioRouteRector.php',
|
||||
'Rector\\Symfony\\Rector\\ClassMethod\\RemoveUnusedRequestParamRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/ClassMethod/RemoveUnusedRequestParamRector.php',
|
||||
'Rector\\Symfony\\Rector\\ClassMethod\\ReplaceSensioRouteAnnotationWithSymfonyRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/ClassMethod/ReplaceSensioRouteAnnotationWithSymfonyRector.php',
|
||||
'Rector\\Symfony\\Rector\\ClassMethod\\ResponseReturnTypeControllerActionRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/ClassMethod/ResponseReturnTypeControllerActionRector.php',
|
||||
'Rector\\Symfony\\Rector\\ClassMethod\\TemplateAnnotationToThisRenderRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/ClassMethod/TemplateAnnotationToThisRenderRector.php',
|
||||
'Rector\\Symfony\\Rector\\Class_\\ChangeFileLoaderInExtensionAndKernelRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/Class_/ChangeFileLoaderInExtensionAndKernelRector.php',
|
||||
'Rector\\Symfony\\Rector\\Class_\\ContainerGetToRequiredDependencyAbstractClassRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/Class_/ContainerGetToRequiredDependencyAbstractClassRector.php',
|
||||
'Rector\\Symfony\\Rector\\Class_\\EventListenerToEventSubscriberRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/Class_/EventListenerToEventSubscriberRector.php',
|
||||
'Rector\\Symfony\\Rector\\Class_\\FormTypeWithDependencyToOptionsRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/Class_/FormTypeWithDependencyToOptionsRector.php',
|
||||
'Rector\\Symfony\\Rector\\Class_\\LoadValidatorMetadataToAnnotationRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/Class_/LoadValidatorMetadataToAnnotationRector.php',
|
||||
'Rector\\Symfony\\Rector\\Class_\\MagicClosureTwigExtensionToNativeMethodsRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/Class_/MagicClosureTwigExtensionToNativeMethodsRector.php',
|
||||
'Rector\\Symfony\\Rector\\Class_\\MakeCommandLazyRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/Class_/MakeCommandLazyRector.php',
|
||||
'Rector\\Symfony\\Rector\\Closure\\ContainerGetNameToTypeInTestsRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/Closure/ContainerGetNameToTypeInTestsRector.php',
|
||||
'Rector\\Symfony\\Rector\\Closure\\MinimalSharedStringSolver' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/Closure/MinimalSharedStringSolver.php',
|
||||
'Rector\\Symfony\\Rector\\Closure\\ServiceArgsToServiceNamedArgRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/Closure/ServiceArgsToServiceNamedArgRector.php',
|
||||
'Rector\\Symfony\\Rector\\Closure\\ServiceSetStringNameToClassNameRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/Closure/ServiceSetStringNameToClassNameRector.php',
|
||||
'Rector\\Symfony\\Rector\\Closure\\ServiceSettersToSettersAutodiscoveryRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/Closure/ServiceSettersToSettersAutodiscoveryRector.php',
|
||||
'Rector\\Symfony\\Rector\\Closure\\ServiceTagsToDefaultsAutoconfigureRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/Closure/ServiceTagsToDefaultsAutoconfigureRector.php',
|
||||
'Rector\\Symfony\\Rector\\Closure\\ServicesSetNameToSetTypeRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/Closure/ServicesSetNameToSetTypeRector.php',
|
||||
'Rector\\Symfony\\Rector\\MethodCall\\GetToConstructorInjectionRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/MethodCall/GetToConstructorInjectionRector.php',
|
||||
'Rector\\Symfony\\Rector\\MethodCall\\LiteralGetToRequestClassConstantRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/MethodCall/LiteralGetToRequestClassConstantRector.php',
|
||||
'Rector\\Symfony\\Rector\\MethodCall\\SwiftCreateMessageToNewEmailRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/MethodCall/SwiftCreateMessageToNewEmailRector.php',
|
||||
'Rector\\Symfony\\Rector\\MethodCall\\SwiftSetBodyToHtmlPlainMethodCallRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/MethodCall/SwiftSetBodyToHtmlPlainMethodCallRector.php',
|
||||
'Rector\\Symfony\\Rector\\MethodCall\\WebTestCaseAssertSelectorTextContainsRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/MethodCall/WebTestCaseAssertSelectorTextContainsRector.php',
|
||||
'Rector\\Symfony\\Rector\\Return_\\SimpleFunctionAndFilterRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/Return_/SimpleFunctionAndFilterRector.php',
|
||||
'Rector\\Symfony\\Rector\\StaticCall\\AddMessageToEqualsResponseCodeRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/StaticCall/AddMessageToEqualsResponseCodeRector.php',
|
||||
'Rector\\Symfony\\Set\\FOSRestSetList' => __DIR__ . '/..' . '/rector/rector-symfony/src/Set/FOSRestSetList.php',
|
||||
'Rector\\Symfony\\Set\\JMSSetList' => __DIR__ . '/..' . '/rector/rector-symfony/src/Set/JMSSetList.php',
|
||||
'Rector\\Symfony\\Set\\SensiolabsSetList' => __DIR__ . '/..' . '/rector/rector-symfony/src/Set/SensiolabsSetList.php',
|
||||
|
@ -2861,6 +2854,8 @@ class ComposerStaticInit536c2135f804a468ecfee59c1baa719f
|
|||
'Rector\\Symfony\\Symfony30\\Rector\\MethodCall\\StringFormTypeToClassRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony30/Rector/MethodCall/StringFormTypeToClassRector.php',
|
||||
'Rector\\Symfony\\Symfony33\\Rector\\ClassConstFetch\\ConsoleExceptionToErrorEventConstantRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony33/Rector/ClassConstFetch/ConsoleExceptionToErrorEventConstantRector.php',
|
||||
'Rector\\Symfony\\Symfony34\\Rector\\ClassMethod\\MergeMethodAnnotationToRouteAnnotationRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony34/Rector/ClassMethod/MergeMethodAnnotationToRouteAnnotationRector.php',
|
||||
'Rector\\Symfony\\Symfony34\\Rector\\ClassMethod\\RemoveServiceFromSensioRouteRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony34/Rector/ClassMethod/RemoveServiceFromSensioRouteRector.php',
|
||||
'Rector\\Symfony\\Symfony34\\Rector\\ClassMethod\\ReplaceSensioRouteAnnotationWithSymfonyRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony34/Rector/ClassMethod/ReplaceSensioRouteAnnotationWithSymfonyRector.php',
|
||||
'Rector\\Symfony\\Symfony40\\Rector\\ConstFetch\\ConstraintUrlOptionRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony40/Rector/ConstFetch/ConstraintUrlOptionRector.php',
|
||||
'Rector\\Symfony\\Symfony40\\Rector\\MethodCall\\ContainerBuilderCompileEnvArgumentRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony40/Rector/MethodCall/ContainerBuilderCompileEnvArgumentRector.php',
|
||||
'Rector\\Symfony\\Symfony40\\Rector\\MethodCall\\FormIsValidRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony40/Rector/MethodCall/FormIsValidRector.php',
|
||||
|
@ -2876,6 +2871,7 @@ class ComposerStaticInit536c2135f804a468ecfee59c1baa719f
|
|||
'Rector\\Symfony\\Symfony43\\Rector\\MethodCall\\MakeDispatchFirstArgumentEventRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony43/Rector/MethodCall/MakeDispatchFirstArgumentEventRector.php',
|
||||
'Rector\\Symfony\\Symfony43\\Rector\\MethodCall\\WebTestCaseAssertIsSuccessfulRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony43/Rector/MethodCall/WebTestCaseAssertIsSuccessfulRector.php',
|
||||
'Rector\\Symfony\\Symfony43\\Rector\\MethodCall\\WebTestCaseAssertResponseCodeRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony43/Rector/MethodCall/WebTestCaseAssertResponseCodeRector.php',
|
||||
'Rector\\Symfony\\Symfony43\\Rector\\MethodCall\\WebTestCaseAssertSelectorTextContainsRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony43/Rector/MethodCall/WebTestCaseAssertSelectorTextContainsRector.php',
|
||||
'Rector\\Symfony\\Symfony43\\Rector\\StmtsAwareInterface\\TwigBundleFilesystemLoaderToTwigRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony43/Rector/StmtsAwareInterface/TwigBundleFilesystemLoaderToTwigRector.php',
|
||||
'Rector\\Symfony\\Symfony44\\Rector\\ClassMethod\\ConsoleExecuteReturnIntRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector.php',
|
||||
'Rector\\Symfony\\Symfony44\\Rector\\MethodCall\\AuthorizationCheckerIsGrantedExtractorRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony44/Rector/MethodCall/AuthorizationCheckerIsGrantedExtractorRector.php',
|
||||
|
@ -2895,6 +2891,7 @@ class ComposerStaticInit536c2135f804a468ecfee59c1baa719f
|
|||
'Rector\\Symfony\\Symfony60\\Rector\\FuncCall\\ReplaceServiceArgumentRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony60/Rector/FuncCall/ReplaceServiceArgumentRector.php',
|
||||
'Rector\\Symfony\\Symfony60\\Rector\\MethodCall\\GetHelperControllerToServiceRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony60/Rector/MethodCall/GetHelperControllerToServiceRector.php',
|
||||
'Rector\\Symfony\\Symfony61\\Rector\\Class_\\CommandPropertyToAttributeRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony61/Rector/Class_/CommandPropertyToAttributeRector.php',
|
||||
'Rector\\Symfony\\Symfony61\\Rector\\Class_\\MagicClosureTwigExtensionToNativeMethodsRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony61/Rector/Class_/MagicClosureTwigExtensionToNativeMethodsRector.php',
|
||||
'Rector\\Symfony\\Symfony61\\Rector\\StaticPropertyFetch\\ErrorNamesPropertyToConstantRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony61/Rector/StaticPropertyFetch/ErrorNamesPropertyToConstantRector.php',
|
||||
'Rector\\Symfony\\Symfony62\\Rector\\ClassMethod\\ParamConverterAttributeToMapEntityAttributeRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony62/Rector/ClassMethod/ParamConverterAttributeToMapEntityAttributeRector.php',
|
||||
'Rector\\Symfony\\Symfony62\\Rector\\Class_\\MessageHandlerInterfaceToAttributeRector' => __DIR__ . '/..' . '/rector/rector-symfony/rules/Symfony62/Rector/Class_/MessageHandlerInterfaceToAttributeRector.php',
|
||||
|
@ -3096,9 +3093,9 @@ class ComposerStaticInit536c2135f804a468ecfee59c1baa719f
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit536c2135f804a468ecfee59c1baa719f::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit536c2135f804a468ecfee59c1baa719f::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit536c2135f804a468ecfee59c1baa719f::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInite535d2bd7fd35a9c35c41ffd8c45e286::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInite535d2bd7fd35a9c35c41ffd8c45e286::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInite535d2bd7fd35a9c35c41ffd8c45e286::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
8
vendor/composer/installed.json
vendored
8
vendor/composer/installed.json
vendored
|
@ -2121,12 +2121,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
|
||||
"reference": "c9ba1a339bb3018adfa7dbcb95151ac4c0429f96"
|
||||
"reference": "a1e4c92fd692b34816d55484b372383d73cceabc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/c9ba1a339bb3018adfa7dbcb95151ac4c0429f96",
|
||||
"reference": "c9ba1a339bb3018adfa7dbcb95151ac4c0429f96",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/a1e4c92fd692b34816d55484b372383d73cceabc",
|
||||
"reference": "a1e4c92fd692b34816d55484b372383d73cceabc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2156,7 +2156,7 @@
|
|||
"tomasvotruba\/type-coverage": "^0.2",
|
||||
"tomasvotruba\/unused-public": "^0.1"
|
||||
},
|
||||
"time": "2023-06-24T10:40:59+00:00",
|
||||
"time": "2023-06-24T14:28:48+00:00",
|
||||
"default-branch": true,
|
||||
"type": "rector-extension",
|
||||
"extra": {
|
||||
|
|
2
vendor/composer/installed.php
vendored
2
vendor/composer/installed.php
vendored
File diff suppressed because one or more lines are too long
|
@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
|
|||
*/
|
||||
final class GeneratedConfig
|
||||
{
|
||||
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main f0c1a5f'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main b19346b'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main e60de61'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main c9ba1a3'));
|
||||
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main f0c1a5f'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main b19346b'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main e60de61'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main a1e4c92'));
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
|
2
vendor/rector/rector-symfony/composer.json
vendored
2
vendor/rector/rector-symfony/composer.json
vendored
|
@ -54,7 +54,7 @@
|
|||
"phpstan": "vendor\/bin\/phpstan analyse --ansi --error-format symplify",
|
||||
"check-cs": "vendor\/bin\/ecs check --ansi",
|
||||
"fix-cs": "vendor\/bin\/ecs check --fix --ansi",
|
||||
"docs": "vendor\/bin\/rule-doc-generator generate src --output-file docs\/rector_rules_overview.md --ansi"
|
||||
"docs": "vendor\/bin\/rule-doc-generator generate src rules --output-file docs\/rector_rules_overview.md --ansi"
|
||||
},
|
||||
"extra": {
|
||||
"enable-patching": true,
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix202306;
|
||||
|
||||
use Rector\Config\RectorConfig;
|
||||
use Rector\Symfony\Rector\ClassMethod\RemoveServiceFromSensioRouteRector;
|
||||
use Rector\Symfony\Rector\ClassMethod\ReplaceSensioRouteAnnotationWithSymfonyRector;
|
||||
return static function (RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->rule(ReplaceSensioRouteAnnotationWithSymfonyRector::class);
|
||||
$rectorConfig->rule(RemoveServiceFromSensioRouteRector::class);
|
||||
};
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
|||
namespace RectorPrefix202306;
|
||||
|
||||
use Rector\Config\RectorConfig;
|
||||
use Rector\Symfony\Rector\ClassMethod\TemplateAnnotationToThisRenderRector;
|
||||
use Rector\Symfony\CodeQuality\Rector\ClassMethod\TemplateAnnotationToThisRenderRector;
|
||||
return static function (RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->rule(TemplateAnnotationToThisRenderRector::class);
|
||||
};
|
||||
|
|
|
@ -4,12 +4,14 @@ declare (strict_types=1);
|
|||
namespace RectorPrefix202306;
|
||||
|
||||
use Rector\Config\RectorConfig;
|
||||
use Rector\Symfony\Rector\BinaryOp\ResponseStatusCodeRector;
|
||||
use Rector\Symfony\Rector\Class_\EventListenerToEventSubscriberRector;
|
||||
use Rector\Symfony\Rector\Class_\MakeCommandLazyRector;
|
||||
use Rector\Symfony\Rector\ClassMethod\RemoveUnusedRequestParamRector;
|
||||
use Rector\Symfony\Rector\ClassMethod\ResponseReturnTypeControllerActionRector;
|
||||
use Rector\Symfony\Rector\MethodCall\LiteralGetToRequestClassConstantRector;
|
||||
use Rector\Symfony\CodeQuality\Rector\BinaryOp\ResponseStatusCodeRector;
|
||||
use Rector\Symfony\CodeQuality\Rector\Class_\EventListenerToEventSubscriberRector;
|
||||
use Rector\Symfony\CodeQuality\Rector\Class_\MakeCommandLazyRector;
|
||||
use Rector\Symfony\CodeQuality\Rector\ClassMethod\ActionSuffixRemoverRector;
|
||||
use Rector\Symfony\CodeQuality\Rector\ClassMethod\ParamTypeFromRouteRequiredRegexRector;
|
||||
use Rector\Symfony\CodeQuality\Rector\ClassMethod\RemoveUnusedRequestParamRector;
|
||||
use Rector\Symfony\CodeQuality\Rector\ClassMethod\ResponseReturnTypeControllerActionRector;
|
||||
use Rector\Symfony\CodeQuality\Rector\MethodCall\LiteralGetToRequestClassConstantRector;
|
||||
return static function (RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->rules([
|
||||
MakeCommandLazyRector::class,
|
||||
|
@ -19,5 +21,7 @@ return static function (RectorConfig $rectorConfig) : void {
|
|||
ResponseStatusCodeRector::class,
|
||||
LiteralGetToRequestClassConstantRector::class,
|
||||
RemoveUnusedRequestParamRector::class,
|
||||
ParamTypeFromRouteRequiredRegexRector::class,
|
||||
ActionSuffixRemoverRector::class,
|
||||
]);
|
||||
};
|
||||
|
|
|
@ -7,7 +7,8 @@ use Rector\Config\RectorConfig;
|
|||
use Rector\Removing\Rector\ClassMethod\ArgumentRemoverRector;
|
||||
use Rector\Removing\ValueObject\ArgumentRemover;
|
||||
use Rector\Symfony\Symfony34\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector;
|
||||
use Rector\Symfony\Symfony34\Rector\ClassMethod\ReplaceSensioRouteAnnotationWithSymfonyRector;
|
||||
return static function (RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->ruleWithConfiguration(ArgumentRemoverRector::class, [new ArgumentRemover('Symfony\\Component\\Yaml\\Yaml', 'parse', 2, ['Symfony\\Component\\Yaml\\Yaml::PARSE_KEYS_AS_STRINGS'])]);
|
||||
$rectorConfig->rule(MergeMethodAnnotationToRouteAnnotationRector::class);
|
||||
$rectorConfig->rules([MergeMethodAnnotationToRouteAnnotationRector::class, ReplaceSensioRouteAnnotationWithSymfonyRector::class]);
|
||||
};
|
||||
|
|
|
@ -15,11 +15,12 @@ use Rector\Symfony\Symfony43\Rector\MethodCall\GetCurrencyBundleMethodCallsToInt
|
|||
use Rector\Symfony\Symfony43\Rector\MethodCall\MakeDispatchFirstArgumentEventRector;
|
||||
use Rector\Symfony\Symfony43\Rector\MethodCall\WebTestCaseAssertIsSuccessfulRector;
|
||||
use Rector\Symfony\Symfony43\Rector\MethodCall\WebTestCaseAssertResponseCodeRector;
|
||||
use Rector\Symfony\Symfony43\Rector\MethodCall\WebTestCaseAssertSelectorTextContainsRector;
|
||||
use Rector\Symfony\Symfony43\Rector\StmtsAwareInterface\TwigBundleFilesystemLoaderToTwigRector;
|
||||
# https://github.com/symfony/symfony/blob/4.4/UPGRADE-4.3.md
|
||||
return static function (RectorConfig $rectorConfig) : void {
|
||||
# https://symfony.com/blog/new-in-symfony-4-3-better-test-assertions
|
||||
$rectorConfig->rules([WebTestCaseAssertIsSuccessfulRector::class, WebTestCaseAssertResponseCodeRector::class, TwigBundleFilesystemLoaderToTwigRector::class, MakeDispatchFirstArgumentEventRector::class, GetCurrencyBundleMethodCallsToIntlRector::class, ConvertRenderTemplateShortNotationToBundleSyntaxRector::class, EventDispatcherParentConstructRector::class]);
|
||||
$rectorConfig->rules([WebTestCaseAssertIsSuccessfulRector::class, WebTestCaseAssertResponseCodeRector::class, WebTestCaseAssertSelectorTextContainsRector::class, TwigBundleFilesystemLoaderToTwigRector::class, MakeDispatchFirstArgumentEventRector::class, GetCurrencyBundleMethodCallsToIntlRector::class, ConvertRenderTemplateShortNotationToBundleSyntaxRector::class, EventDispatcherParentConstructRector::class]);
|
||||
$rectorConfig->ruleWithConfiguration(RenameMethodRector::class, [new MethodCallRename('Symfony\\Component\\BrowserKit\\Response', 'getStatus', 'getStatusCode'), new MethodCallRename('Symfony\\Component\\Security\\Http\\Firewall', 'handleRequest', 'callListeners')]);
|
||||
$rectorConfig->ruleWithConfiguration(RenameClassRector::class, [
|
||||
// assets deprecation
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# 81 Rules Overview
|
||||
# 80 Rules Overview
|
||||
|
||||
## ActionSuffixRemoverRector
|
||||
|
||||
|
@ -18,31 +18,6 @@ Removes Action suffixes from methods in Symfony Controllers
|
|||
|
||||
<br>
|
||||
|
||||
## AddMessageToEqualsResponseCodeRector
|
||||
|
||||
Add response content to response code assert, so it is easier to debug
|
||||
|
||||
- class: [`Rector\Symfony\Rector\StaticCall\AddMessageToEqualsResponseCodeRector`](../src/Rector/StaticCall/AddMessageToEqualsResponseCodeRector.php)
|
||||
|
||||
```diff
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
final class SomeClassTest extends TestCase
|
||||
{
|
||||
public function test(Response $response)
|
||||
{
|
||||
$this->assertEquals(
|
||||
Response::HTTP_NO_CONTENT,
|
||||
$response->getStatusCode()
|
||||
+ $response->getContent()
|
||||
);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
## AddRouteAnnotationRector
|
||||
|
||||
Collect routes from Symfony project router and add Route annotation to controller action
|
||||
|
@ -70,7 +45,7 @@ Collect routes from Symfony project router and add Route annotation to controlle
|
|||
|
||||
Change `$context->addViolationAt` to `$context->buildViolation` on Validator ExecutionContext
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\AddViolationToBuildViolationRector`](../src/Rector/MethodCall/AddViolationToBuildViolationRector.php)
|
||||
- class: [`Rector\Symfony\Symfony25\Rector\MethodCall\AddViolationToBuildViolationRector`](../rules/Symfony25/Rector/MethodCall/AddViolationToBuildViolationRector.php)
|
||||
|
||||
```diff
|
||||
-$context->addViolationAt('property', 'The value {{ value }} is invalid.', array(
|
||||
|
@ -88,7 +63,7 @@ Change `$context->addViolationAt` to `$context->buildViolation` on Validator Exe
|
|||
|
||||
Change `$this->authorizationChecker->isGranted([$a, $b])` to `$this->authorizationChecker->isGranted($a) || $this->authorizationChecker->isGranted($b)`
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\AuthorizationCheckerIsGrantedExtractorRector`](../src/Rector/MethodCall/AuthorizationCheckerIsGrantedExtractorRector.php)
|
||||
- class: [`Rector\Symfony\Symfony44\Rector\MethodCall\AuthorizationCheckerIsGrantedExtractorRector`](../rules/Symfony44/Rector/MethodCall/AuthorizationCheckerIsGrantedExtractorRector.php)
|
||||
|
||||
```diff
|
||||
-if ($this->authorizationChecker->isGranted(['ROLE_USER', 'ROLE_ADMIN'])) {
|
||||
|
@ -102,7 +77,7 @@ Change `$this->authorizationChecker->isGranted([$a, $b])` to `$this->authorizati
|
|||
|
||||
Change deprecated `BinaryFileResponse::create()` to use `__construct()` instead
|
||||
|
||||
- class: [`Rector\Symfony\Rector\StaticCall\BinaryFileResponseCreateToNewInstanceRector`](../src/Rector/StaticCall/BinaryFileResponseCreateToNewInstanceRector.php)
|
||||
- class: [`Rector\Symfony\Symfony52\Rector\StaticCall\BinaryFileResponseCreateToNewInstanceRector`](../rules/Symfony52/Rector/StaticCall/BinaryFileResponseCreateToNewInstanceRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\HttpFoundation;
|
||||
|
@ -123,7 +98,7 @@ Change deprecated `BinaryFileResponse::create()` to use `__construct()` instead
|
|||
|
||||
Rename `type` option to `entry_type` in CollectionType
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector`](../src/Rector/MethodCall/ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector.php)
|
||||
- class: [`Rector\Symfony\Symfony27\Rector\MethodCall\ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector`](../rules/Symfony27/Rector/MethodCall/ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
|
@ -147,60 +122,11 @@ Rename `type` option to `entry_type` in CollectionType
|
|||
|
||||
<br>
|
||||
|
||||
## ChangeFileLoaderInExtensionAndKernelRector
|
||||
|
||||
Change XML loader to YAML in Bundle Extension
|
||||
|
||||
:wrench: **configure it!**
|
||||
|
||||
- class: [`Rector\Symfony\Rector\Class_\ChangeFileLoaderInExtensionAndKernelRector`](../src/Rector/Class_/ChangeFileLoaderInExtensionAndKernelRector.php)
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Rector\Config\RectorConfig;
|
||||
use Rector\Symfony\Rector\Class_\ChangeFileLoaderInExtensionAndKernelRector;
|
||||
|
||||
return static function (RectorConfig $rectorConfig): void {
|
||||
$rectorConfig->ruleWithConfiguration(ChangeFileLoaderInExtensionAndKernelRector::class, [
|
||||
ChangeFileLoaderInExtensionAndKernelRector::FROM => 'xml',
|
||||
ChangeFileLoaderInExtensionAndKernelRector::TO => 'yaml',
|
||||
]);
|
||||
};
|
||||
```
|
||||
|
||||
↓
|
||||
|
||||
```diff
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
-use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
|
||||
+use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
|
||||
final class SomeExtension extends Extension
|
||||
{
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
- $loader = new XmlFileLoader($container, new FileLocator());
|
||||
- $loader->load(__DIR__ . '/../Resources/config/controller.xml');
|
||||
- $loader->load(__DIR__ . '/../Resources/config/events.xml');
|
||||
+ $loader = new YamlFileLoader($container, new FileLocator());
|
||||
+ $loader->load(__DIR__ . '/../Resources/config/controller.yaml');
|
||||
+ $loader->load(__DIR__ . '/../Resources/config/events.yaml');
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
## ChangeStringCollectionOptionToConstantRector
|
||||
|
||||
Change type in CollectionType from alias string to class reference
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\ChangeStringCollectionOptionToConstantRector`](../src/Rector/MethodCall/ChangeStringCollectionOptionToConstantRector.php)
|
||||
- class: [`Rector\Symfony\Symfony30\Rector\MethodCall\ChangeStringCollectionOptionToConstantRector`](../rules/Symfony30/Rector/MethodCall/ChangeStringCollectionOptionToConstantRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
|
@ -230,7 +156,7 @@ Change type in CollectionType from alias string to class reference
|
|||
|
||||
Changes int return from execute to use Symfony Command constants.
|
||||
|
||||
- class: [`Rector\Symfony\Rector\ClassMethod\CommandConstantReturnCodeRector`](../src/Rector/ClassMethod/CommandConstantReturnCodeRector.php)
|
||||
- class: [`Rector\Symfony\Symfony51\Rector\ClassMethod\CommandConstantReturnCodeRector`](../rules/Symfony51/Rector/ClassMethod/CommandConstantReturnCodeRector.php)
|
||||
|
||||
```diff
|
||||
class SomeCommand extends Command
|
||||
|
@ -250,7 +176,7 @@ Changes int return from execute to use Symfony Command constants.
|
|||
|
||||
Symfony Command description setters are moved to properties
|
||||
|
||||
- class: [`Rector\Symfony\Rector\Class_\CommandDescriptionToPropertyRector`](../src/Rector/Class_/CommandDescriptionToPropertyRector.php)
|
||||
- class: [`Rector\Symfony\Symfony53\Rector\Class_\CommandDescriptionToPropertyRector`](../rules/Symfony53/Rector/Class_/CommandDescriptionToPropertyRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\Console\Command\Command
|
||||
|
@ -272,7 +198,7 @@ Symfony Command description setters are moved to properties
|
|||
|
||||
Add `Symfony\Component\Console\Attribute\AsCommand` to Symfony Commands and remove the deprecated properties
|
||||
|
||||
- class: [`Rector\Symfony\Rector\Class_\CommandPropertyToAttributeRector`](../src/Rector/Class_/CommandPropertyToAttributeRector.php)
|
||||
- class: [`Rector\Symfony\Symfony61\Rector\Class_\CommandPropertyToAttributeRector`](../rules/Symfony61/Rector/Class_/CommandPropertyToAttributeRector.php)
|
||||
|
||||
```diff
|
||||
+use Symfony\Component\Console\Attribute\AsCommand;
|
||||
|
@ -292,7 +218,7 @@ Add `Symfony\Component\Console\Attribute\AsCommand` to Symfony Commands and remo
|
|||
|
||||
Turns old event name with EXCEPTION to ERROR constant in Console in Symfony
|
||||
|
||||
- class: [`Rector\Symfony\Rector\ClassConstFetch\ConsoleExceptionToErrorEventConstantRector`](../src/Rector/ClassConstFetch/ConsoleExceptionToErrorEventConstantRector.php)
|
||||
- class: [`Rector\Symfony\Symfony33\Rector\ClassConstFetch\ConsoleExceptionToErrorEventConstantRector`](../rules/Symfony33/Rector/ClassConstFetch/ConsoleExceptionToErrorEventConstantRector.php)
|
||||
|
||||
```diff
|
||||
-"console.exception"
|
||||
|
@ -312,7 +238,7 @@ Turns old event name with EXCEPTION to ERROR constant in Console in Symfony
|
|||
|
||||
Returns int from `Command::execute()` command
|
||||
|
||||
- class: [`Rector\Symfony\Rector\ClassMethod\ConsoleExecuteReturnIntRector`](../src/Rector/ClassMethod/ConsoleExecuteReturnIntRector.php)
|
||||
- class: [`Rector\Symfony\Symfony44\Rector\ClassMethod\ConsoleExecuteReturnIntRector`](../rules/Symfony44/Rector/ClassMethod/ConsoleExecuteReturnIntRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
|
@ -334,7 +260,7 @@ Returns int from `Command::execute()` command
|
|||
|
||||
Turns true value to `Url::CHECK_DNS_TYPE_ANY` in Validator in Symfony.
|
||||
|
||||
- class: [`Rector\Symfony\Rector\ConstFetch\ConstraintUrlOptionRector`](../src/Rector/ConstFetch/ConstraintUrlOptionRector.php)
|
||||
- class: [`Rector\Symfony\Symfony40\Rector\ConstFetch\ConstraintUrlOptionRector`](../rules/Symfony40/Rector/ConstFetch/ConstraintUrlOptionRector.php)
|
||||
|
||||
```diff
|
||||
-$constraint = new Url(["checkDNS" => true]);
|
||||
|
@ -347,7 +273,7 @@ Turns true value to `Url::CHECK_DNS_TYPE_ANY` in Validator in Symfony.
|
|||
|
||||
Turns old default value to parameter in `ContainerBuilder->build()` method in DI in Symfony
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\ContainerBuilderCompileEnvArgumentRector`](../src/Rector/MethodCall/ContainerBuilderCompileEnvArgumentRector.php)
|
||||
- class: [`Rector\Symfony\Symfony40\Rector\MethodCall\ContainerBuilderCompileEnvArgumentRector`](../rules/Symfony40/Rector/MethodCall/ContainerBuilderCompileEnvArgumentRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
|
@ -385,7 +311,7 @@ Change `$container->get("some_name")` to bare type, useful since Symfony 3.4
|
|||
|
||||
Turns fetching of dependencies via `$container->get()` in ContainerAware to constructor injection in Command and Controller in Symfony
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\ContainerGetToConstructorInjectionRector`](../src/Rector/MethodCall/ContainerGetToConstructorInjectionRector.php)
|
||||
- class: [`Rector\Symfony\Symfony42\Rector\MethodCall\ContainerGetToConstructorInjectionRector`](../rules/Symfony42/Rector/MethodCall/ContainerGetToConstructorInjectionRector.php)
|
||||
|
||||
```diff
|
||||
final class SomeCommand extends ContainerAwareCommand
|
||||
|
@ -443,7 +369,7 @@ Change `$this->get("some_service");` to `@required` dependency in an abstract cl
|
|||
|
||||
Change Twig template short name to bundle syntax in render calls from controllers
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\ConvertRenderTemplateShortNotationToBundleSyntaxRector`](../src/Rector/MethodCall/ConvertRenderTemplateShortNotationToBundleSyntaxRector.php)
|
||||
- class: [`Rector\Symfony\Symfony43\Rector\MethodCall\ConvertRenderTemplateShortNotationToBundleSyntaxRector`](../rules/Symfony43/Rector/MethodCall/ConvertRenderTemplateShortNotationToBundleSyntaxRector.php)
|
||||
|
||||
```diff
|
||||
class BaseController extends Controller {
|
||||
|
@ -461,7 +387,7 @@ Change Twig template short name to bundle syntax in render calls from controller
|
|||
|
||||
Migrates from deprecated `Definition/Alias->setPrivate()` to `Definition/Alias->setPublic()`
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\DefinitionAliasSetPrivateToSetPublicRector`](../src/Rector/MethodCall/DefinitionAliasSetPrivateToSetPublicRector.php)
|
||||
- class: [`Rector\Symfony\Symfony52\Rector\MethodCall\DefinitionAliasSetPrivateToSetPublicRector`](../rules/Symfony52/Rector/MethodCall/DefinitionAliasSetPrivateToSetPublicRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\DependencyInjection\Alias;
|
||||
|
@ -488,7 +414,7 @@ Migrates from deprecated `Definition/Alias->setPrivate()` to `Definition/Alias->
|
|||
|
||||
Turns old Constraint::$errorNames properties to use Constraint::ERROR_NAMES instead
|
||||
|
||||
- class: [`Rector\Symfony\Rector\StaticPropertyFetch\ErrorNamesPropertyToConstantRector`](../src/Rector/StaticPropertyFetch/ErrorNamesPropertyToConstantRector.php)
|
||||
- class: [`Rector\Symfony\Symfony61\Rector\StaticPropertyFetch\ErrorNamesPropertyToConstantRector`](../rules/Symfony61/Rector/StaticPropertyFetch/ErrorNamesPropertyToConstantRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
|
@ -503,11 +429,32 @@ Turns old Constraint::$errorNames properties to use Constraint::ERROR_NAMES inst
|
|||
|
||||
<br>
|
||||
|
||||
## EventDispatcherParentConstructRector
|
||||
|
||||
Removes parent construct method call in EventDispatcher class
|
||||
|
||||
- class: [`Rector\Symfony\Symfony43\Rector\ClassMethod\EventDispatcherParentConstructRector`](../rules/Symfony43/Rector/ClassMethod/EventDispatcherParentConstructRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
|
||||
final class SomeEventDispatcher extends EventDispatcher
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$value = 1000;
|
||||
+ parent::__construct();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
## EventListenerToEventSubscriberRector
|
||||
|
||||
Change Symfony Event listener class to Event Subscriber based on configuration in service.yaml file
|
||||
|
||||
- class: [`Rector\Symfony\Rector\Class_\EventListenerToEventSubscriberRector`](../src/Rector/Class_/EventListenerToEventSubscriberRector.php)
|
||||
- class: [`Rector\Symfony\CodeQuality\Rector\Class_\EventListenerToEventSubscriberRector`](../rules/CodeQuality/Rector/Class_/EventListenerToEventSubscriberRector.php)
|
||||
|
||||
```diff
|
||||
-class SomeListener
|
||||
|
@ -542,7 +489,7 @@ Change Symfony Event listener class to Event Subscriber based on configuration i
|
|||
|
||||
Migrates from deprecated Form Builder->setDataMapper(new `PropertyPathMapper())` to Builder->setDataMapper(new DataMapper(new `PropertyPathAccessor()))`
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\FormBuilderSetDataMapperRector`](../src/Rector/MethodCall/FormBuilderSetDataMapperRector.php)
|
||||
- class: [`Rector\Symfony\Symfony52\Rector\MethodCall\FormBuilderSetDataMapperRector`](../rules/Symfony52/Rector/MethodCall/FormBuilderSetDataMapperRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper;
|
||||
|
@ -566,7 +513,7 @@ Migrates from deprecated Form Builder->setDataMapper(new `PropertyPathMapper())`
|
|||
|
||||
Adds `$form->isSubmitted()` validation to all `$form->isValid()` calls in Form in Symfony
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\FormIsValidRector`](../src/Rector/MethodCall/FormIsValidRector.php)
|
||||
- class: [`Rector\Symfony\Symfony40\Rector\MethodCall\FormIsValidRector`](../rules/Symfony40/Rector/MethodCall/FormIsValidRector.php)
|
||||
|
||||
```diff
|
||||
-if ($form->isValid()) {
|
||||
|
@ -580,7 +527,7 @@ Adds `$form->isSubmitted()` validation to all `$form->isValid()` calls in Form i
|
|||
|
||||
Turns string Form Type references to their CONSTANT alternatives in `getParent()` and `getExtendedType()` methods in Form in Symfony
|
||||
|
||||
- class: [`Rector\Symfony\Rector\ClassMethod\FormTypeGetParentRector`](../src/Rector/ClassMethod/FormTypeGetParentRector.php)
|
||||
- class: [`Rector\Symfony\Symfony30\Rector\ClassMethod\FormTypeGetParentRector`](../rules/Symfony30/Rector/ClassMethod/FormTypeGetParentRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
|
@ -616,7 +563,7 @@ Turns string Form Type references to their CONSTANT alternatives in `getParent()
|
|||
|
||||
Changes createForm(new FormType), add(new FormType) to ones with "FormType::class"
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\FormTypeInstanceToClassConstRector`](../src/Rector/MethodCall/FormTypeInstanceToClassConstRector.php)
|
||||
- class: [`Rector\Symfony\Symfony30\Rector\MethodCall\FormTypeInstanceToClassConstRector`](../rules/Symfony30/Rector/MethodCall/FormTypeInstanceToClassConstRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
|
@ -671,7 +618,7 @@ Move constructor dependency from form type class to an `$options` parameter
|
|||
|
||||
Intl static bundle method were changed to direct static calls
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\GetCurrencyBundleMethodCallsToIntlRector`](../src/Rector/MethodCall/GetCurrencyBundleMethodCallsToIntlRector.php)
|
||||
- class: [`Rector\Symfony\Symfony43\Rector\MethodCall\GetCurrencyBundleMethodCallsToIntlRector`](../rules/Symfony43/Rector/MethodCall/GetCurrencyBundleMethodCallsToIntlRector.php)
|
||||
|
||||
```diff
|
||||
-$currencyBundle = \Symfony\Component\Intl\Intl::getCurrencyBundle();
|
||||
|
@ -686,7 +633,7 @@ Intl static bundle method were changed to direct static calls
|
|||
|
||||
Replace `$this->getDoctrine()` and `$this->dispatchMessage()` calls in AbstractController with direct service use
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\GetHelperControllerToServiceRector`](../src/Rector/MethodCall/GetHelperControllerToServiceRector.php)
|
||||
- class: [`Rector\Symfony\Symfony60\Rector\MethodCall\GetHelperControllerToServiceRector`](../rules/Symfony60/Rector/MethodCall/GetHelperControllerToServiceRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
|
@ -713,7 +660,7 @@ Replace `$this->getDoctrine()` and `$this->dispatchMessage()` calls in AbstractC
|
|||
|
||||
Turns fetching of Request via `$this->getRequest()` to action injection
|
||||
|
||||
- class: [`Rector\Symfony\Rector\ClassMethod\GetRequestRector`](../src/Rector/ClassMethod/GetRequestRector.php)
|
||||
- class: [`Rector\Symfony\Symfony30\Rector\ClassMethod\GetRequestRector`](../rules/Symfony30/Rector/ClassMethod/GetRequestRector.php)
|
||||
|
||||
```diff
|
||||
+use Symfony\Component\HttpFoundation\Request;
|
||||
|
@ -762,7 +709,7 @@ Turns fetching of dependencies via `$this->get()` to constructor injection in Co
|
|||
|
||||
Simplify use of assertions in WebTestCase
|
||||
|
||||
- class: [`Rector\Symfony\Rector\StaticPropertyFetch\KernelTestCaseContainerPropertyDeprecationRector`](../src/Rector/StaticPropertyFetch/KernelTestCaseContainerPropertyDeprecationRector.php)
|
||||
- class: [`Rector\Symfony\Symfony53\Rector\StaticPropertyFetch\KernelTestCaseContainerPropertyDeprecationRector`](../rules/Symfony53/Rector/StaticPropertyFetch/KernelTestCaseContainerPropertyDeprecationRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
|
@ -783,7 +730,7 @@ Simplify use of assertions in WebTestCase
|
|||
|
||||
Replace "GET" string by Symfony Request object class constants
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\LiteralGetToRequestClassConstantRector`](../src/Rector/MethodCall/LiteralGetToRequestClassConstantRector.php)
|
||||
- class: [`Rector\Symfony\CodeQuality\Rector\MethodCall\LiteralGetToRequestClassConstantRector`](../rules/CodeQuality/Rector/MethodCall/LiteralGetToRequestClassConstantRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
@ -832,7 +779,7 @@ Move metadata from `loadValidatorMetadata()` to property/getter/method annotatio
|
|||
|
||||
Change logout handler to an event listener that listens to LogoutEvent
|
||||
|
||||
- class: [`Rector\Symfony\Rector\Class_\LogoutHandlerToLogoutEventSubscriberRector`](../src/Rector/Class_/LogoutHandlerToLogoutEventSubscriberRector.php)
|
||||
- class: [`Rector\Symfony\Symfony51\Rector\Class_\LogoutHandlerToLogoutEventSubscriberRector`](../rules/Symfony51/Rector/Class_/LogoutHandlerToLogoutEventSubscriberRector.php)
|
||||
|
||||
```diff
|
||||
-use Symfony\Component\Security\Http\Logout\LogoutHandlerInterface;
|
||||
|
@ -871,7 +818,7 @@ Change logout handler to an event listener that listens to LogoutEvent
|
|||
|
||||
Change logout success handler to an event listener that listens to LogoutEvent
|
||||
|
||||
- class: [`Rector\Symfony\Rector\Class_\LogoutSuccessHandlerToLogoutEventSubscriberRector`](../src/Rector/Class_/LogoutSuccessHandlerToLogoutEventSubscriberRector.php)
|
||||
- class: [`Rector\Symfony\Symfony51\Rector\Class_\LogoutSuccessHandlerToLogoutEventSubscriberRector`](../rules/Symfony51/Rector/Class_/LogoutSuccessHandlerToLogoutEventSubscriberRector.php)
|
||||
|
||||
```diff
|
||||
-use Symfony\Component\Security\Http\Logout\LogoutSuccessHandlerInterface;
|
||||
|
@ -951,7 +898,7 @@ Change TwigExtension function/filter magic closures to inlined and clear callabl
|
|||
|
||||
Make Symfony commands lazy
|
||||
|
||||
- class: [`Rector\Symfony\Rector\Class_\MakeCommandLazyRector`](../src/Rector/Class_/MakeCommandLazyRector.php)
|
||||
- class: [`Rector\Symfony\CodeQuality\Rector\Class_\MakeCommandLazyRector`](../rules/CodeQuality/Rector/Class_/MakeCommandLazyRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\Console\Command\Command
|
||||
|
@ -972,7 +919,7 @@ Make Symfony commands lazy
|
|||
|
||||
Make event object a first argument of `dispatch()` method, event name as second
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\MakeDispatchFirstArgumentEventRector`](../src/Rector/MethodCall/MakeDispatchFirstArgumentEventRector.php)
|
||||
- class: [`Rector\Symfony\Symfony43\Rector\MethodCall\MakeDispatchFirstArgumentEventRector`](../rules/Symfony43/Rector/MethodCall/MakeDispatchFirstArgumentEventRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
|
||||
|
@ -993,7 +940,7 @@ Make event object a first argument of `dispatch()` method, event name as second
|
|||
|
||||
Change form option "max_length" to a form "attr" > "max_length"
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\MaxLengthSymfonyFormOptionToAttrRector`](../src/Rector/MethodCall/MaxLengthSymfonyFormOptionToAttrRector.php)
|
||||
- class: [`Rector\Symfony\Symfony25\Rector\MethodCall\MaxLengthSymfonyFormOptionToAttrRector`](../rules/Symfony25/Rector/MethodCall/MaxLengthSymfonyFormOptionToAttrRector.php)
|
||||
|
||||
```diff
|
||||
$formBuilder = new Symfony\Component\Form\FormBuilder();
|
||||
|
@ -1010,7 +957,7 @@ Change form option "max_length" to a form "attr" > "max_length"
|
|||
|
||||
Merge removed `@Method` annotation to `@Route` one
|
||||
|
||||
- class: [`Rector\Symfony\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector`](../src/Rector/ClassMethod/MergeMethodAnnotationToRouteAnnotationRector.php)
|
||||
- class: [`Rector\Symfony\Symfony34\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector`](../rules/Symfony34/Rector/ClassMethod/MergeMethodAnnotationToRouteAnnotationRector.php)
|
||||
|
||||
```diff
|
||||
-use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
|
||||
|
@ -1035,7 +982,7 @@ Merge removed `@Method` annotation to `@Route` one
|
|||
|
||||
Replaces MessageHandlerInterface with AsMessageHandler attribute
|
||||
|
||||
- class: [`Rector\Symfony\Rector\Class_\MessageHandlerInterfaceToAttributeRector`](../src/Rector/Class_/MessageHandlerInterfaceToAttributeRector.php)
|
||||
- class: [`Rector\Symfony\Symfony62\Rector\Class_\MessageHandlerInterfaceToAttributeRector`](../rules/Symfony62/Rector/Class_/MessageHandlerInterfaceToAttributeRector.php)
|
||||
|
||||
```diff
|
||||
-use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
||||
|
@ -1058,7 +1005,7 @@ Replaces MessageHandlerInterface with AsMessageHandler attribute
|
|||
|
||||
Turns old option names to new ones in FormTypes in Form in Symfony
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\OptionNameRector`](../src/Rector/MethodCall/OptionNameRector.php)
|
||||
- class: [`Rector\Symfony\Symfony30\Rector\MethodCall\OptionNameRector`](../rules/Symfony30/Rector/MethodCall/OptionNameRector.php)
|
||||
|
||||
```diff
|
||||
$builder = new FormBuilder;
|
||||
|
@ -1072,7 +1019,7 @@ Turns old option names to new ones in FormTypes in Form in Symfony
|
|||
|
||||
Replace ParamConverter attribute with mappings with the MapEntity attribute
|
||||
|
||||
- class: [`Rector\Symfony\Rector\ClassMethod\ParamConverterAttributeToMapEntityAttributeRector`](../src/Rector/ClassMethod/ParamConverterAttributeToMapEntityAttributeRector.php)
|
||||
- class: [`Rector\Symfony\Symfony62\Rector\ClassMethod\ParamConverterAttributeToMapEntityAttributeRector`](../rules/Symfony62/Rector/ClassMethod/ParamConverterAttributeToMapEntityAttributeRector.php)
|
||||
|
||||
```diff
|
||||
+use Symfony\Bridge\Doctrine\Attribute\MapEntity;
|
||||
|
@ -1124,7 +1071,7 @@ Complete strict param type declaration based on route annotation
|
|||
|
||||
Replaces deprecated `Yaml::parse()` of file argument with file contents
|
||||
|
||||
- class: [`Rector\Symfony\Rector\StaticCall\ParseFileRector`](../src/Rector/StaticCall/ParseFileRector.php)
|
||||
- class: [`Rector\Symfony\Symfony28\Rector\StaticCall\ParseFileRector`](../rules/Symfony28/Rector/StaticCall/ParseFileRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
|
@ -1139,7 +1086,7 @@ Replaces deprecated `Yaml::parse()` of file argument with file contents
|
|||
|
||||
Removes `$processBuilder->getProcess()` calls to `$processBuilder` in Process in Symfony, because ProcessBuilder was removed. This is part of multi-step Rector and has very narrow focus.
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\ProcessBuilderGetProcessRector`](../src/Rector/MethodCall/ProcessBuilderGetProcessRector.php)
|
||||
- class: [`Rector\Symfony\Symfony40\Rector\MethodCall\ProcessBuilderGetProcessRector`](../rules/Symfony40/Rector/MethodCall/ProcessBuilderGetProcessRector.php)
|
||||
|
||||
```diff
|
||||
$processBuilder = new Symfony\Component\Process\ProcessBuilder;
|
||||
|
@ -1155,7 +1102,7 @@ Removes `$processBuilder->getProcess()` calls to `$processBuilder` in Process in
|
|||
|
||||
Turns `ProcessBuilder::instance()` to new ProcessBuilder in Process in Symfony. Part of multi-step Rector.
|
||||
|
||||
- class: [`Rector\Symfony\Rector\StaticCall\ProcessBuilderInstanceRector`](../src/Rector/StaticCall/ProcessBuilderInstanceRector.php)
|
||||
- class: [`Rector\Symfony\Symfony40\Rector\StaticCall\ProcessBuilderInstanceRector`](../rules/Symfony40/Rector/StaticCall/ProcessBuilderInstanceRector.php)
|
||||
|
||||
```diff
|
||||
-$processBuilder = Symfony\Component\Process\ProcessBuilder::instance($args);
|
||||
|
@ -1168,7 +1115,7 @@ Turns `ProcessBuilder::instance()` to new ProcessBuilder in Process in Symfony.
|
|||
|
||||
Changes first argument of `PropertyAccessor::__construct()` to flags from boolean
|
||||
|
||||
- class: [`Rector\Symfony\Rector\New_\PropertyAccessorCreationBooleanToFlagsRector`](../src/Rector/New_/PropertyAccessorCreationBooleanToFlagsRector.php)
|
||||
- class: [`Rector\Symfony\Symfony52\Rector\New_\PropertyAccessorCreationBooleanToFlagsRector`](../rules/Symfony52/Rector/New_/PropertyAccessorCreationBooleanToFlagsRector.php)
|
||||
|
||||
```diff
|
||||
class SomeClass
|
||||
|
@ -1187,7 +1134,7 @@ Changes first argument of `PropertyAccessor::__construct()` to flags from boolea
|
|||
|
||||
Migrate from PropertyPathMapper to DataMapper and PropertyPathAccessor
|
||||
|
||||
- class: [`Rector\Symfony\Rector\New_\PropertyPathMapperToDataMapperRector`](../src/Rector/New_/PropertyPathMapperToDataMapperRector.php)
|
||||
- class: [`Rector\Symfony\Symfony52\Rector\New_\PropertyPathMapperToDataMapperRector`](../rules/Symfony52/Rector/New_/PropertyPathMapperToDataMapperRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper;
|
||||
|
@ -1208,7 +1155,7 @@ Migrate from PropertyPathMapper to DataMapper and PropertyPathAccessor
|
|||
|
||||
Change "read_only" option in form to attribute
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\ReadOnlyOptionToAttributeRector`](../src/Rector/MethodCall/ReadOnlyOptionToAttributeRector.php)
|
||||
- class: [`Rector\Symfony\Symfony30\Rector\MethodCall\ReadOnlyOptionToAttributeRector`](../rules/Symfony30/Rector/MethodCall/ReadOnlyOptionToAttributeRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
@ -1226,7 +1173,7 @@ Change "read_only" option in form to attribute
|
|||
|
||||
Turns redirect to route to short helper method in Controller in Symfony
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\RedirectToRouteRector`](../src/Rector/MethodCall/RedirectToRouteRector.php)
|
||||
- class: [`Rector\Symfony\Symfony26\Rector\MethodCall\RedirectToRouteRector`](../rules/Symfony26/Rector/MethodCall/RedirectToRouteRector.php)
|
||||
|
||||
```diff
|
||||
-$this->redirect($this->generateUrl("homepage"));
|
||||
|
@ -1239,7 +1186,7 @@ Turns redirect to route to short helper method in Controller in Symfony
|
|||
|
||||
Migrates from deprecated enable_magic_call_extraction context option in ReflectionExtractor
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\ReflectionExtractorEnableMagicCallExtractorRector`](../src/Rector/MethodCall/ReflectionExtractorEnableMagicCallExtractorRector.php)
|
||||
- class: [`Rector\Symfony\Symfony52\Rector\MethodCall\ReflectionExtractorEnableMagicCallExtractorRector`](../rules/Symfony52/Rector/MethodCall/ReflectionExtractorEnableMagicCallExtractorRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor;
|
||||
|
@ -1263,7 +1210,7 @@ Migrates from deprecated enable_magic_call_extraction context option in Reflecti
|
|||
|
||||
Rename `getBlockPrefix()` if it returns the default value - class to underscore, e.g. UserFormType = user_form
|
||||
|
||||
- class: [`Rector\Symfony\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector`](../src/Rector/ClassMethod/RemoveDefaultGetBlockPrefixRector.php)
|
||||
- class: [`Rector\Symfony\Symfony30\Rector\ClassMethod\RemoveDefaultGetBlockPrefixRector`](../rules/Symfony30/Rector/ClassMethod/RemoveDefaultGetBlockPrefixRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
|
@ -1306,7 +1253,7 @@ Remove service from Sensio `@Route`
|
|||
|
||||
Remove unused `$request` parameter from controller action
|
||||
|
||||
- class: [`Rector\Symfony\Rector\ClassMethod\RemoveUnusedRequestParamRector`](../src/Rector/ClassMethod/RemoveUnusedRequestParamRector.php)
|
||||
- class: [`Rector\Symfony\CodeQuality\Rector\ClassMethod\RemoveUnusedRequestParamRector`](../rules/CodeQuality/Rector/ClassMethod/RemoveUnusedRequestParamRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
@ -1353,7 +1300,7 @@ Replace defined `service()` argument in Symfony PHP config
|
|||
|
||||
:wrench: **configure it!**
|
||||
|
||||
- class: [`Rector\Symfony\Rector\FuncCall\ReplaceServiceArgumentRector`](../src/Rector/FuncCall/ReplaceServiceArgumentRector.php)
|
||||
- class: [`Rector\Symfony\Symfony60\Rector\FuncCall\ReplaceServiceArgumentRector`](../rules/Symfony60/Rector/FuncCall/ReplaceServiceArgumentRector.php)
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
@ -1362,7 +1309,7 @@ declare(strict_types=1);
|
|||
|
||||
use PhpParser\Node\Scalar\String_;
|
||||
use Rector\Config\RectorConfig;
|
||||
use Rector\Symfony\Rector\FuncCall\ReplaceServiceArgumentRector;
|
||||
use Rector\Symfony\Symfony60\Rector\FuncCall\ReplaceServiceArgumentRector;
|
||||
use Rector\Symfony\ValueObject\ReplaceServiceArgument;
|
||||
|
||||
return static function (RectorConfig $rectorConfig): void {
|
||||
|
@ -1388,7 +1335,7 @@ return static function (RectorConfig $rectorConfig): void {
|
|||
|
||||
Add Response object return type to controller actions
|
||||
|
||||
- class: [`Rector\Symfony\Rector\ClassMethod\ResponseReturnTypeControllerActionRector`](../src/Rector/ClassMethod/ResponseReturnTypeControllerActionRector.php)
|
||||
- class: [`Rector\Symfony\CodeQuality\Rector\ClassMethod\ResponseReturnTypeControllerActionRector`](../rules/CodeQuality/Rector/ClassMethod/ResponseReturnTypeControllerActionRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
|
@ -1412,7 +1359,7 @@ Add Response object return type to controller actions
|
|||
|
||||
Turns status code numbers to constants
|
||||
|
||||
- class: [`Rector\Symfony\Rector\BinaryOp\ResponseStatusCodeRector`](../src/Rector/BinaryOp/ResponseStatusCodeRector.php)
|
||||
- class: [`Rector\Symfony\CodeQuality\Rector\BinaryOp\ResponseStatusCodeRector`](../rules/CodeQuality/Rector/BinaryOp/ResponseStatusCodeRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
@ -1438,7 +1385,7 @@ Turns status code numbers to constants
|
|||
|
||||
Changes TreeBuilder with `root()` call to constructor passed root and `getRootNode()` call
|
||||
|
||||
- class: [`Rector\Symfony\Rector\New_\RootNodeTreeBuilderRector`](../src/Rector/New_/RootNodeTreeBuilderRector.php)
|
||||
- class: [`Rector\Symfony\Symfony42\Rector\New_\RootNodeTreeBuilderRector`](../rules/Symfony42/Rector/New_/RootNodeTreeBuilderRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
||||
|
@ -1456,7 +1403,7 @@ Changes TreeBuilder with `root()` call to constructor passed root and `getRootNo
|
|||
|
||||
Change RouteCollectionBuilder to RoutingConfiguratorRector
|
||||
|
||||
- class: [`Rector\Symfony\Rector\ClassMethod\RouteCollectionBuilderToRoutingConfiguratorRector`](../src/Rector/ClassMethod/RouteCollectionBuilderToRoutingConfiguratorRector.php)
|
||||
- class: [`Rector\Symfony\Symfony51\Rector\ClassMethod\RouteCollectionBuilderToRoutingConfiguratorRector`](../rules/Symfony51/Rector/ClassMethod/RouteCollectionBuilderToRoutingConfiguratorRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
|
||||
|
@ -1620,7 +1567,7 @@ Changes Twig_Function_Method to Twig_SimpleFunction calls in Twig_Extension.
|
|||
|
||||
Symplify form rendering by not calling `->createView()` on `render` function
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\SimplifyFormRenderingRector`](../src/Rector/MethodCall/SimplifyFormRenderingRector.php)
|
||||
- class: [`Rector\Symfony\Symfony62\Rector\MethodCall\SimplifyFormRenderingRector`](../rules/Symfony62/Rector/MethodCall/SimplifyFormRenderingRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
|
@ -1643,7 +1590,7 @@ Symplify form rendering by not calling `->createView()` on `render` function
|
|||
|
||||
Turns string Form Type references to their CONSTANT alternatives in FormTypes in Form in Symfony. To enable custom types, add link to your container XML dump in "$rectorConfig->symfonyContainerXml(...)"
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\StringFormTypeToClassRector`](../src/Rector/MethodCall/StringFormTypeToClassRector.php)
|
||||
- class: [`Rector\Symfony\Symfony30\Rector\MethodCall\StringFormTypeToClassRector`](../rules/Symfony30/Rector/MethodCall/StringFormTypeToClassRector.php)
|
||||
|
||||
```diff
|
||||
$formBuilder = new Symfony\Component\Form\FormBuilder;
|
||||
|
@ -1657,7 +1604,7 @@ Turns string Form Type references to their CONSTANT alternatives in FormTypes in
|
|||
|
||||
Changes Process string argument to an array
|
||||
|
||||
- class: [`Rector\Symfony\Rector\New_\StringToArrayArgumentProcessRector`](../src/Rector/New_/StringToArrayArgumentProcessRector.php)
|
||||
- class: [`Rector\Symfony\Symfony42\Rector\New_\StringToArrayArgumentProcessRector`](../rules/Symfony42/Rector/New_/StringToArrayArgumentProcessRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Component\Process\Process;
|
||||
|
@ -1727,7 +1674,7 @@ Turns `@Template` annotation to explicit method call in Controller of FrameworkE
|
|||
|
||||
Change TwigBundle FilesystemLoader to native one
|
||||
|
||||
- class: [`Rector\Symfony\Rector\StmtsAwareInterface\TwigBundleFilesystemLoaderToTwigRector`](../src/Rector/StmtsAwareInterface/TwigBundleFilesystemLoaderToTwigRector.php)
|
||||
- class: [`Rector\Symfony\Symfony43\Rector\StmtsAwareInterface\TwigBundleFilesystemLoaderToTwigRector`](../rules/Symfony43/Rector/StmtsAwareInterface/TwigBundleFilesystemLoaderToTwigRector.php)
|
||||
|
||||
```diff
|
||||
-use Symfony\Bundle\TwigBundle\Loader\FilesystemLoader;
|
||||
|
@ -1746,7 +1693,7 @@ Change TwigBundle FilesystemLoader to native one
|
|||
|
||||
Migrates from deprecated ValidatorBuilder->enableAnnotationMapping($reader) to ValidatorBuilder->enableAnnotationMapping(true)->setDoctrineAnnotationReader($reader)
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\ValidatorBuilderEnableAnnotationMappingRector`](../src/Rector/MethodCall/ValidatorBuilderEnableAnnotationMappingRector.php)
|
||||
- class: [`Rector\Symfony\Symfony52\Rector\MethodCall\ValidatorBuilderEnableAnnotationMappingRector`](../rules/Symfony52/Rector/MethodCall/ValidatorBuilderEnableAnnotationMappingRector.php)
|
||||
|
||||
```diff
|
||||
use Doctrine\Common\Annotations\Reader;
|
||||
|
@ -1768,7 +1715,7 @@ Migrates from deprecated ValidatorBuilder->enableAnnotationMapping($reader) to V
|
|||
|
||||
Adds a new `$filter` argument in `VarDumperTestTrait->assertDumpEquals()` and `VarDumperTestTrait->assertDumpMatchesFormat()` in Validator in Symfony.
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\VarDumperTestTraitMethodArgsRector`](../src/Rector/MethodCall/VarDumperTestTraitMethodArgsRector.php)
|
||||
- class: [`Rector\Symfony\Symfony40\Rector\MethodCall\VarDumperTestTraitMethodArgsRector`](../rules/Symfony40/Rector/MethodCall/VarDumperTestTraitMethodArgsRector.php)
|
||||
|
||||
```diff
|
||||
-$varDumperTestTrait->assertDumpEquals($dump, $data, $message = "");
|
||||
|
@ -1788,7 +1735,7 @@ Adds a new `$filter` argument in `VarDumperTestTrait->assertDumpEquals()` and `V
|
|||
|
||||
Simplify use of assertions in WebTestCase
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\WebTestCaseAssertIsSuccessfulRector`](../src/Rector/MethodCall/WebTestCaseAssertIsSuccessfulRector.php)
|
||||
- class: [`Rector\Symfony\Symfony43\Rector\MethodCall\WebTestCaseAssertIsSuccessfulRector`](../rules/Symfony43/Rector/MethodCall/WebTestCaseAssertIsSuccessfulRector.php)
|
||||
|
||||
```diff
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
@ -1809,7 +1756,7 @@ Simplify use of assertions in WebTestCase
|
|||
|
||||
Simplify use of assertions in WebTestCase
|
||||
|
||||
- class: [`Rector\Symfony\Rector\MethodCall\WebTestCaseAssertResponseCodeRector`](../src/Rector/MethodCall/WebTestCaseAssertResponseCodeRector.php)
|
||||
- class: [`Rector\Symfony\Symfony43\Rector\MethodCall\WebTestCaseAssertResponseCodeRector`](../rules/Symfony43/Rector/MethodCall/WebTestCaseAssertResponseCodeRector.php)
|
||||
|
||||
```diff
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Symfony\Tests\CodeQuality\Rector\ClassMethod\ActionSuffixRemoverRector;
|
||||
|
||||
use Iterator;
|
||||
use RectorPrefix202306\PHPUnit\Framework\Attributes\DataProvider;
|
||||
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
final class ActionSuffixRemoverRectorTest extends AbstractRectorTestCase
|
||||
{
|
||||
public function test(string $filePath) : void
|
||||
{
|
||||
$this->doTestFile($filePath);
|
||||
}
|
||||
public static function provideData() : Iterator
|
||||
{
|
||||
return self::yieldFilesFromDirectory(__DIR__ . '/Fixture');
|
||||
}
|
||||
public function provideConfigFilePath() : string
|
||||
{
|
||||
return __DIR__ . '/config/configured_rule.php';
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace Rector\Symfony\Tests\Rector\ClassMethod\ActionSuffixRemoverRector\Fixture;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
|
||||
class AppController extends Controller
|
||||
{
|
||||
public function indexAction()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\Symfony\Tests\Rector\ClassMethod\ActionSuffixRemoverRector\Fixture;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
|
||||
class AppController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace Rector\Symfony\Tests\Rector\ClassMethod\ActionSuffixRemoverRector\Fixture;
|
||||
|
||||
use Rector\Symfony\Tests\Rector\Source\AbstractSymfonyController;
|
||||
|
||||
class AppController2 extends AbstractSymfonyController
|
||||
{
|
||||
public function indexAction()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\Symfony\Tests\Rector\ClassMethod\ActionSuffixRemoverRector\Fixture;
|
||||
|
||||
use Rector\Symfony\Tests\Rector\Source\AbstractSymfonyController;
|
||||
|
||||
class AppController2 extends AbstractSymfonyController
|
||||
{
|
||||
public function indexAction()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace Rector\Symfony\Tests\Rector\ClassMethod\ActionSuffixRemoverRector\Fixture;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
|
||||
class AppController extends Controller
|
||||
{
|
||||
private function indexAction()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\Symfony\Tests\Rector\ClassMethod\ActionSuffixRemoverRector\Fixture;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
|
||||
class AppController extends Controller
|
||||
{
|
||||
private function indexAction()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace Rector\Symfony\Tests\Rector\ClassMethod\ActionSuffixRemoverRector\Fixture;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
|
||||
class AppController extends Controller
|
||||
{
|
||||
public static function indexAction()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\Symfony\Tests\Rector\ClassMethod\ActionSuffixRemoverRector\Fixture;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
|
||||
class AppController extends Controller
|
||||
{
|
||||
public static function indexAction()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix202306;
|
||||
|
||||
use Rector\Config\RectorConfig;
|
||||
use Rector\Symfony\CodeQuality\Rector\ClassMethod\ActionSuffixRemoverRector;
|
||||
return static function (RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(__DIR__ . '/../../../../../config/config.php');
|
||||
$rectorConfig->rule(ActionSuffixRemoverRector::class);
|
||||
};
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Symfony\Rector\BinaryOp;
|
||||
namespace Rector\Symfony\CodeQuality\Rector\BinaryOp;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\BinaryOp;
|
||||
|
@ -18,7 +18,7 @@ use Rector\Symfony\ValueObject\ConstantMap\SymfonyResponseConstantMap;
|
|||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
/**
|
||||
* @see \Rector\Symfony\Tests\Rector\BinaryOp\ResponseStatusCodeRector\ResponseStatusCodeRectorTest
|
||||
* @see \Rector\Symfony\Tests\CodeQuality\Rector\BinaryOp\ResponseStatusCodeRector\ResponseStatusCodeRectorTest
|
||||
*/
|
||||
final class ResponseStatusCodeRector extends AbstractRector
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Symfony\Rector\ClassMethod;
|
||||
namespace Rector\Symfony\CodeQuality\Rector\ClassMethod;
|
||||
|
||||
use RectorPrefix202306\Nette\Utils\Strings;
|
||||
use PhpParser\Node;
|
||||
|
@ -12,7 +12,7 @@ use Rector\Symfony\Bridge\NodeAnalyzer\ControllerMethodAnalyzer;
|
|||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
/**
|
||||
* @see \Rector\Symfony\Tests\Rector\ClassMethod\ActionSuffixRemoverRector\ActionSuffixRemoverRectorTest
|
||||
* @see \Rector\Symfony\Tests\CodeQuality\Rector\ClassMethod\ActionSuffixRemoverRector\ActionSuffixRemoverRectorTest
|
||||
*/
|
||||
final class ActionSuffixRemoverRector extends AbstractRector
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Symfony\Rector\ClassMethod;
|
||||
namespace Rector\Symfony\CodeQuality\Rector\ClassMethod;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Param;
|
||||
|
@ -13,7 +13,7 @@ use Rector\Symfony\TypeAnalyzer\ControllerAnalyzer;
|
|||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
/**
|
||||
* @see \Rector\Symfony\Tests\Rector\ClassMethod\ParamTypeFromRouteRequiredRegexRector\ParamTypeFromRouteRequiredRegexRectorTest
|
||||
* @see \Rector\Symfony\Tests\CodeQuality\Rector\ClassMethod\ParamTypeFromRouteRequiredRegexRector\ParamTypeFromRouteRequiredRegexRectorTest
|
||||
*/
|
||||
final class ParamTypeFromRouteRequiredRegexRector extends AbstractRector
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Symfony\Rector\ClassMethod;
|
||||
namespace Rector\Symfony\CodeQuality\Rector\ClassMethod;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\Variable;
|
||||
|
@ -15,7 +15,7 @@ use Rector\Symfony\TypeAnalyzer\ControllerAnalyzer;
|
|||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
/**
|
||||
* @see \Rector\Symfony\Tests\Rector\ClassMethod\RemoveUnusedRequestParamRector\RemoveUnusedRequestParamRectorTest
|
||||
* @see \Rector\Symfony\Tests\CodeQuality\Rector\ClassMethod\RemoveUnusedRequestParamRector\RemoveUnusedRequestParamRectorTest
|
||||
*/
|
||||
final class RemoveUnusedRequestParamRector extends AbstractRector
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Symfony\Rector\ClassMethod;
|
||||
namespace Rector\Symfony\CodeQuality\Rector\ClassMethod;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\MethodCall;
|
||||
|
@ -19,7 +19,7 @@ use Rector\Symfony\TypeAnalyzer\ControllerAnalyzer;
|
|||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
/**
|
||||
* @see \Rector\Symfony\Tests\Rector\ClassMethod\ResponseReturnTypeControllerActionRector\ResponseReturnTypeControllerActionRectorTest
|
||||
* @see \Rector\Symfony\Tests\CodeQuality\Rector\ClassMethod\ResponseReturnTypeControllerActionRector\ResponseReturnTypeControllerActionRectorTest
|
||||
*/
|
||||
final class ResponseReturnTypeControllerActionRector extends AbstractRector
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Symfony\Rector\ClassMethod;
|
||||
namespace Rector\Symfony\CodeQuality\Rector\ClassMethod;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
|
@ -34,9 +34,8 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
|||
/**
|
||||
* @changelog https://github.com/symfony/symfony-docs/pull/12387#discussion_r329551967
|
||||
* @changelog https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/view.html
|
||||
* @changelog https://github.com/sensiolabs/SensioFrameworkExtraBundle/issues/641
|
||||
*
|
||||
* @see \Rector\Symfony\Tests\Symfony43\Rector\ClassMethod\TemplateAnnotationToThisRenderRector\TemplateAnnotationToThisRenderRectorTest
|
||||
* @see \Rector\Symfony\Tests\CodeQuality\Rector\ClassMethod\TemplateAnnotationToThisRenderRector\TemplateAnnotationToThisRenderRectorTest
|
||||
*/
|
||||
final class TemplateAnnotationToThisRenderRector extends AbstractRector
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Symfony\Rector\Class_;
|
||||
namespace Rector\Symfony\CodeQuality\Rector\Class_;
|
||||
|
||||
use RectorPrefix202306\Nette\Utils\Strings;
|
||||
use PhpParser\Node;
|
||||
|
@ -17,7 +17,7 @@ use Rector\Symfony\ValueObject\ServiceDefinition;
|
|||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
/**
|
||||
* @see \Rector\Symfony\Tests\Rector\Class_\EventListenerToEventSubscriberRector\EventListenerToEventSubscriberRectorTest
|
||||
* @see \Rector\Symfony\Tests\CodeQuality\Rector\Class_\EventListenerToEventSubscriberRector\EventListenerToEventSubscriberRectorTest
|
||||
*/
|
||||
final class EventListenerToEventSubscriberRector extends AbstractRector
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Symfony\Rector\Class_;
|
||||
namespace Rector\Symfony\CodeQuality\Rector\Class_;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
|
@ -17,7 +17,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
|||
/**
|
||||
* @changelog https://symfony.com/doc/current/console/commands_as_services.html
|
||||
*
|
||||
* @see \Rector\Symfony\Tests\Rector\Class_\MakeCommandLazyRector\MakeCommandLazyRectorTest
|
||||
* @see \Rector\Symfony\Tests\CodeQuality\Rector\Class_\MakeCommandLazyRector\MakeCommandLazyRectorTest
|
||||
*/
|
||||
final class MakeCommandLazyRector extends AbstractRector
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Symfony\Rector\MethodCall;
|
||||
namespace Rector\Symfony\CodeQuality\Rector\MethodCall;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\MethodCall;
|
||||
|
@ -14,7 +14,7 @@ use Rector\Symfony\ValueObject\ConstantMap\SymfonyRequestConstantMap;
|
|||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
/**
|
||||
* @see \Rector\Symfony\Tests\Rector\MethodCall\LiteralGetToRequestClassConstantRector\LiteralGetToRequestClassConstantRectorTest
|
||||
* @see \Rector\Symfony\Tests\CodeQuality\Rector\MethodCall\LiteralGetToRequestClassConstantRector\LiteralGetToRequestClassConstantRectorTest
|
||||
*/
|
||||
final class LiteralGetToRequestClassConstantRector extends AbstractRector
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Symfony\Rector\ClassMethod;
|
||||
namespace Rector\Symfony\Symfony34\Rector\ClassMethod;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
|
@ -11,9 +11,7 @@ use Rector\Core\Rector\AbstractRector;
|
|||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
/**
|
||||
* @changelog https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/routing.html#route-annotation
|
||||
*
|
||||
* @see \Rector\Symfony\Tests\Rector\ClassMethod\RemoveServiceFromSensioRouteRector\RemoveServiceFromSensioRouteRectorTest
|
||||
* @see \Rector\Symfony\Tests\Symfony34\Rector\ClassMethod\RemoveServiceFromSensioRouteRector\RemoveServiceFromSensioRouteRectorTest
|
||||
*/
|
||||
final class RemoveServiceFromSensioRouteRector extends AbstractRector
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Symfony\Rector\ClassMethod;
|
||||
namespace Rector\Symfony\Symfony34\Rector\ClassMethod;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
|
@ -18,7 +18,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
|||
* @changelog https://medium.com/@nebkam/symfony-deprecated-route-and-method-annotations-4d5e1d34556a
|
||||
* @changelog https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/routing.html#method-annotation
|
||||
*
|
||||
* @see \Rector\Symfony\Tests\Rector\ClassMethod\ReplaceSensioRouteAnnotationWithSymfonyRector\ReplaceSensioRouteAnnotationWithSymfonyRectorTest
|
||||
* @see \Rector\Symfony\Tests\Symfony34\Rector\ClassMethod\ReplaceSensioRouteAnnotationWithSymfonyRector\ReplaceSensioRouteAnnotationWithSymfonyRectorTest
|
||||
*/
|
||||
final class ReplaceSensioRouteAnnotationWithSymfonyRector extends AbstractRector
|
||||
{
|
|
@ -18,7 +18,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
|||
* @changelog https://github.com/symfony/symfony/blob/4.4/src/Symfony/Bundle/FrameworkBundle/Templating/TemplateNameParser.php
|
||||
* @changelog https://symfony.com/doc/4.4/templates.html#bundle-templates
|
||||
*
|
||||
* @see \Rector\Symfony\Tests\Symfony43\Rector\ClassMethod\TemplateAnnotationToThisRenderRector\TemplateAnnotationToThisRenderRectorTest
|
||||
* @see \Rector\Symfony\Tests\CodeQuality\Rector\ClassMethod\TemplateAnnotationToThisRenderRector\TemplateAnnotationToThisRenderRectorTest
|
||||
*/
|
||||
final class ConvertRenderTemplateShortNotationToBundleSyntaxRector extends AbstractRector
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Symfony\Rector\MethodCall;
|
||||
namespace Rector\Symfony\Symfony43\Rector\MethodCall;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Arg;
|
||||
|
@ -18,7 +18,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
|||
* @changelog https://symfony.com/blog/new-in-symfony-4-3-better-test-assertions
|
||||
* @changelog https://github.com/symfony/symfony/pull/30813
|
||||
*
|
||||
* @see \Rector\Symfony\Tests\Rector\MethodCall\WebTestCaseAssertSelectorTextContainsRector\WebTestCaseAssertSelectorTextContainsRectorTest
|
||||
* @see \Rector\Symfony\Tests\Symfony43\Rector\MethodCall\WebTestCaseAssertSelectorTextContainsRector\WebTestCaseAssertSelectorTextContainsRectorTest
|
||||
*/
|
||||
final class WebTestCaseAssertSelectorTextContainsRector extends AbstractRector
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Symfony\Rector\Class_;
|
||||
namespace Rector\Symfony\Symfony61\Rector\Class_;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\Array_;
|
||||
|
@ -19,7 +19,7 @@ use Rector\VersionBonding\Contract\MinPhpVersionInterface;
|
|||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
/**
|
||||
* @see \Rector\Symfony\Tests\Rector\Class_\MagicClosureTwigExtensionToNativeMethodsRector\MagicClosureTwigExtensionToNativeMethodsRectorTest
|
||||
* @see \Rector\Symfony\Tests\Symfony61\Rector\Class_\MagicClosureTwigExtensionToNativeMethodsRector\MagicClosureTwigExtensionToNativeMethodsRectorTest
|
||||
*
|
||||
* @see PHP 8.1 way to handle functions/filters https://github.com/symfony/symfony/blob/e0ad2eead3513a558c09d8aa3ae9e867fb10b419/src/Symfony/Bridge/Twig/Extension/CodeExtension.php#L41-L52
|
||||
*/
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Symfony\Exception;
|
||||
|
||||
use Exception;
|
||||
final class InvalidConfigurationException extends Exception
|
||||
{
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Symfony\Rector\Closure;
|
||||
namespace Rector\Symfony;
|
||||
|
||||
/**
|
||||
* Class Solver copied from https://github.com/Triun/PHP-Longest-Common-Substring
|
|
@ -1,168 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Symfony\Rector\Class_;
|
||||
|
||||
use RectorPrefix202306\Nette\Utils\Strings;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\MethodCall;
|
||||
use PhpParser\Node\Expr\New_;
|
||||
use PhpParser\Node\Expr\Variable;
|
||||
use PhpParser\Node\Name\FullyQualified;
|
||||
use PhpParser\Node\Scalar\String_;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PHPStan\Type\ObjectType;
|
||||
use Rector\Core\Contract\Rector\ConfigurableRectorInterface;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\Symfony\Exception\InvalidConfigurationException;
|
||||
use RectorPrefix202306\Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
|
||||
use RectorPrefix202306\Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
|
||||
use RectorPrefix202306\Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
/**
|
||||
* @see \Rector\Symfony\Tests\Rector\Class_\ChangeFileLoaderInExtensionAndKernelRector\ChangeFileLoaderInExtensionAndKernelRectorTest
|
||||
*
|
||||
* Works best with https://github.com/migrify/config-transformer
|
||||
*/
|
||||
final class ChangeFileLoaderInExtensionAndKernelRector extends AbstractRector implements ConfigurableRectorInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const FROM = 'from';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const TO = 'to';
|
||||
/**
|
||||
* @var array<string, class-string<PhpFileLoader>|class-string<XmlFileLoader>|class-string<YamlFileLoader>>
|
||||
*/
|
||||
private const FILE_LOADERS_BY_TYPE = ['xml' => 'Symfony\\Component\\DependencyInjection\\Loader\\XmlFileLoader', 'yaml' => 'Symfony\\Component\\DependencyInjection\\Loader\\YamlFileLoader', 'php' => 'Symfony\\Component\\DependencyInjection\\Loader\\PhpFileLoader'];
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $from;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $to;
|
||||
public function getRuleDefinition() : RuleDefinition
|
||||
{
|
||||
return new RuleDefinition('Change XML loader to YAML in Bundle Extension', [new ConfiguredCodeSample(<<<'CODE_SAMPLE'
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
|
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
|
||||
final class SomeExtension extends Extension
|
||||
{
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
$loader = new XmlFileLoader($container, new FileLocator());
|
||||
$loader->load(__DIR__ . '/../Resources/config/controller.xml');
|
||||
$loader->load(__DIR__ . '/../Resources/config/events.xml');
|
||||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, <<<'CODE_SAMPLE'
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
|
||||
final class SomeExtension extends Extension
|
||||
{
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
$loader = new YamlFileLoader($container, new FileLocator());
|
||||
$loader->load(__DIR__ . '/../Resources/config/controller.yaml');
|
||||
$loader->load(__DIR__ . '/../Resources/config/events.yaml');
|
||||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, [self::FROM => 'xml', self::TO => 'yaml'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
*/
|
||||
public function getNodeTypes() : array
|
||||
{
|
||||
return [Class_::class];
|
||||
}
|
||||
/**
|
||||
* @param Class_ $node
|
||||
*/
|
||||
public function refactor(Node $node) : ?Node
|
||||
{
|
||||
if (!$this->isKernelOrExtensionClass($node)) {
|
||||
return null;
|
||||
}
|
||||
$this->validateConfiguration($this->from, $this->to);
|
||||
$oldFileLoaderClass = self::FILE_LOADERS_BY_TYPE[$this->from];
|
||||
$newFileLoaderClass = self::FILE_LOADERS_BY_TYPE[$this->to];
|
||||
$this->traverseNodesWithCallable($node->stmts, function (Node $node) use($oldFileLoaderClass, $newFileLoaderClass) {
|
||||
if ($node instanceof New_) {
|
||||
if (!$this->isName($node->class, $oldFileLoaderClass)) {
|
||||
return null;
|
||||
}
|
||||
$node->class = new FullyQualified($newFileLoaderClass);
|
||||
return $node;
|
||||
}
|
||||
return $this->refactorLoadMethodCall($node);
|
||||
});
|
||||
return $node;
|
||||
}
|
||||
public function configure(array $configuration) : void
|
||||
{
|
||||
$this->from = $configuration[self::FROM];
|
||||
$this->to = $configuration[self::TO];
|
||||
}
|
||||
private function isKernelOrExtensionClass(Class_ $class) : bool
|
||||
{
|
||||
if ($this->isObjectType($class, new ObjectType('Symfony\\Component\\HttpKernel\\DependencyInjection\\Extension'))) {
|
||||
return \true;
|
||||
}
|
||||
return $this->isObjectType($class, new ObjectType('Symfony\\Component\\HttpKernel\\Kernel'));
|
||||
}
|
||||
private function validateConfiguration(string $from, string $to) : void
|
||||
{
|
||||
if (!isset(self::FILE_LOADERS_BY_TYPE[$from])) {
|
||||
$message = \sprintf('File loader "%s" format is not supported', $from);
|
||||
throw new InvalidConfigurationException($message);
|
||||
}
|
||||
if (!isset(self::FILE_LOADERS_BY_TYPE[$to])) {
|
||||
$message = \sprintf('File loader "%s" format is not supported', $to);
|
||||
throw new InvalidConfigurationException($message);
|
||||
}
|
||||
}
|
||||
private function refactorLoadMethodCall(Node $node) : ?Node
|
||||
{
|
||||
if (!$node instanceof MethodCall) {
|
||||
return null;
|
||||
}
|
||||
if (!$node->var instanceof Variable) {
|
||||
return null;
|
||||
}
|
||||
if (!$this->isName($node->name, 'load')) {
|
||||
return null;
|
||||
}
|
||||
if (!$this->isObjectType($node->var, new ObjectType('Symfony\\Component\\Config\\Loader\\LoaderInterface'))) {
|
||||
return null;
|
||||
}
|
||||
$this->replaceSuffix($node, $this->from, $this->to);
|
||||
return $node;
|
||||
}
|
||||
private function replaceSuffix(MethodCall $methodCall, string $from, string $to) : void
|
||||
{
|
||||
// replace XML to YAML suffix in string parts
|
||||
$fileArgument = $methodCall->getArgs()[0]->value;
|
||||
$this->traverseNodesWithCallable([$fileArgument], function (Node $node) use($from, $to) : ?Node {
|
||||
if (!$node instanceof String_) {
|
||||
return null;
|
||||
}
|
||||
$node->value = Strings::replace($node->value, '#\\.' . $from . '$#', '.' . $to);
|
||||
return $node;
|
||||
});
|
||||
}
|
||||
}
|
|
@ -19,6 +19,7 @@ use PHPStan\Type\ObjectType;
|
|||
use Rector\Core\Exception\ShouldNotHappenException;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\Symfony\MinimalSharedStringSolver;
|
||||
use Rector\Symfony\NodeAnalyzer\SymfonyPhpClosureDetector;
|
||||
use Rector\Symfony\ValueObject\ClassNameAndFilePath;
|
||||
use RectorPrefix202306\Symfony\Component\Filesystem\Filesystem;
|
||||
|
@ -46,7 +47,7 @@ final class ServiceSettersToSettersAutodiscoveryRector extends AbstractRector
|
|||
private $filesystem;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Symfony\Rector\Closure\MinimalSharedStringSolver
|
||||
* @var \Rector\Symfony\MinimalSharedStringSolver
|
||||
*/
|
||||
private $minimalSharedStringSolver;
|
||||
public function __construct(SymfonyPhpClosureDetector $symfonyPhpClosureDetector, ReflectionProvider $reflectionProvider, Filesystem $filesystem)
|
||||
|
@ -54,7 +55,7 @@ final class ServiceSettersToSettersAutodiscoveryRector extends AbstractRector
|
|||
$this->symfonyPhpClosureDetector = $symfonyPhpClosureDetector;
|
||||
$this->reflectionProvider = $reflectionProvider;
|
||||
$this->filesystem = $filesystem;
|
||||
$this->minimalSharedStringSolver = new \Rector\Symfony\Rector\Closure\MinimalSharedStringSolver();
|
||||
$this->minimalSharedStringSolver = new MinimalSharedStringSolver();
|
||||
}
|
||||
public function getRuleDefinition() : RuleDefinition
|
||||
{
|
||||
|
|
|
@ -1,119 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Symfony\Rector\StaticCall;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Arg;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Expr\ClassConstFetch;
|
||||
use PhpParser\Node\Expr\MethodCall;
|
||||
use PhpParser\Node\Expr\StaticCall;
|
||||
use PhpParser\Node\Expr\Variable;
|
||||
use PHPStan\Type\ObjectType;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
/**
|
||||
* @see \Rector\Symfony\Tests\Rector\StaticCall\AddMessageToEqualsResponseCodeRector\AddMessageToEqualsResponseCodeRectorTest
|
||||
*/
|
||||
final class AddMessageToEqualsResponseCodeRector extends AbstractRector
|
||||
{
|
||||
public function getRuleDefinition() : RuleDefinition
|
||||
{
|
||||
return new RuleDefinition('Add response content to response code assert, so it is easier to debug', [new CodeSample(<<<'CODE_SAMPLE'
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
final class SomeClassTest extends TestCase
|
||||
{
|
||||
public function test(Response $response)
|
||||
{
|
||||
$this->assertEquals(
|
||||
Response::HTTP_NO_CONTENT,
|
||||
$response->getStatusCode()
|
||||
);
|
||||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, <<<'CODE_SAMPLE'
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
final class SomeClassTest extends TestCase
|
||||
{
|
||||
public function test(Response $response)
|
||||
{
|
||||
$this->assertEquals(
|
||||
Response::HTTP_NO_CONTENT,
|
||||
$response->getStatusCode()
|
||||
$response->getContent()
|
||||
);
|
||||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
)]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
*/
|
||||
public function getNodeTypes() : array
|
||||
{
|
||||
return [StaticCall::class, MethodCall::class];
|
||||
}
|
||||
/**
|
||||
* @param StaticCall|MethodCall $node
|
||||
*/
|
||||
public function refactor(Node $node) : ?Node
|
||||
{
|
||||
if (!$this->isName($node->name, 'assertEquals')) {
|
||||
return null;
|
||||
}
|
||||
// already has 3rd "message" argument
|
||||
if (isset($node->args[2])) {
|
||||
return null;
|
||||
}
|
||||
$firstArg = $node->args[0];
|
||||
if (!$firstArg instanceof Arg) {
|
||||
return null;
|
||||
}
|
||||
if (!$this->isHttpRequestArgument($firstArg->value)) {
|
||||
return null;
|
||||
}
|
||||
$secondArg = $node->args[1];
|
||||
if (!$secondArg instanceof Arg) {
|
||||
return null;
|
||||
}
|
||||
$expr = $this->getParentOfGetStatusCode($secondArg->value);
|
||||
if (!$expr instanceof Expr) {
|
||||
return null;
|
||||
}
|
||||
$getContentMethodCall = new MethodCall($expr, 'getContent');
|
||||
$node->args[2] = new Arg($getContentMethodCall);
|
||||
return $node;
|
||||
}
|
||||
/**
|
||||
* $this->assertX(Response::SOME_STATUS)
|
||||
*/
|
||||
private function isHttpRequestArgument(Expr $expr) : bool
|
||||
{
|
||||
if (!$expr instanceof ClassConstFetch) {
|
||||
return \false;
|
||||
}
|
||||
return $this->isObjectType($expr->class, new ObjectType('Symfony\\Component\\HttpFoundation\\Response'));
|
||||
}
|
||||
/**
|
||||
* @return Variable|MethodCall|Expr|null
|
||||
*/
|
||||
private function getParentOfGetStatusCode(Expr $expr) : ?Node
|
||||
{
|
||||
$currentNode = $expr;
|
||||
while ($currentNode instanceof MethodCall) {
|
||||
if ($this->isName($currentNode->name, 'getStatusCode')) {
|
||||
return $currentNode->var;
|
||||
}
|
||||
$currentNode = $currentNode->var;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -9,10 +9,6 @@ use Rector\Set\Contract\SetListInterface;
|
|||
*/
|
||||
final class SensiolabsSetList implements SetListInterface
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const FRAMEWORK_EXTRA_40 = __DIR__ . '/../../config/sets/sensiolabs/framework-extra-40.php';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user