mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-14 23:22:22 +00:00
Updated Rector to commit 91f6470cbc
91f6470cbc
[DX] Update to use Method Call from RectorConfig on rector configs ( config/set dir) (#2108)
This commit is contained in:
parent
9f5c92023c
commit
5dd71bbea3
|
@ -14,12 +14,11 @@ use Rector\DowngradePhp73\Rector\List_\DowngradeListReferenceAssignmentRector;
|
|||
use Rector\DowngradePhp73\Rector\String_\DowngradeFlexibleHeredocSyntaxRector;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->phpVersion(\Rector\Core\ValueObject\PhpVersion::PHP_72);
|
||||
$services = $rectorConfig->services();
|
||||
$services->set(\Rector\DowngradePhp73\Rector\String_\DowngradeFlexibleHeredocSyntaxRector::class);
|
||||
$services->set(\Rector\DowngradePhp73\Rector\List_\DowngradeListReferenceAssignmentRector::class);
|
||||
$services->set(\Rector\DowngradePhp73\Rector\FuncCall\DowngradeTrailingCommasInFunctionCallsRector::class);
|
||||
$services->set(\Rector\DowngradePhp73\Rector\FuncCall\DowngradeArrayKeyFirstLastRector::class);
|
||||
$services->set(\Rector\DowngradePhp73\Rector\FuncCall\SetCookieOptionsArrayToArgumentsRector::class);
|
||||
$services->set(\Rector\DowngradePhp73\Rector\FuncCall\DowngradeIsCountableRector::class);
|
||||
$services->set(\Rector\DowngradePhp73\Rector\ConstFetch\DowngradePhp73JsonConstRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp73\Rector\String_\DowngradeFlexibleHeredocSyntaxRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp73\Rector\List_\DowngradeListReferenceAssignmentRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp73\Rector\FuncCall\DowngradeTrailingCommasInFunctionCallsRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp73\Rector\FuncCall\DowngradeArrayKeyFirstLastRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp73\Rector\FuncCall\SetCookieOptionsArrayToArgumentsRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp73\Rector\FuncCall\DowngradeIsCountableRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp73\Rector\ConstFetch\DowngradePhp73JsonConstRector::class);
|
||||
};
|
||||
|
|
|
@ -19,17 +19,16 @@ use Rector\DowngradePhp74\Rector\MethodCall\DowngradeReflectionGetTypeRector;
|
|||
use Rector\DowngradePhp74\Rector\Property\DowngradeTypedPropertyRector;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->phpVersion(\Rector\Core\ValueObject\PhpVersion::PHP_73);
|
||||
$services = $rectorConfig->services();
|
||||
$services->set(\Rector\DowngradePhp74\Rector\Property\DowngradeTypedPropertyRector::class);
|
||||
$services->set(\Rector\DowngradePhp74\Rector\ArrowFunction\ArrowFunctionToAnonymousFunctionRector::class);
|
||||
$services->set(\Rector\DowngradePhp74\Rector\ClassMethod\DowngradeCovariantReturnTypeRector::class);
|
||||
$services->set(\Rector\DowngradePhp74\Rector\ClassMethod\DowngradeContravariantArgumentTypeRector::class);
|
||||
$services->set(\Rector\DowngradePhp74\Rector\Coalesce\DowngradeNullCoalescingOperatorRector::class);
|
||||
$services->set(\Rector\DowngradePhp74\Rector\LNumber\DowngradeNumericLiteralSeparatorRector::class);
|
||||
$services->set(\Rector\DowngradePhp74\Rector\FuncCall\DowngradeStripTagsCallWithArrayRector::class);
|
||||
$services->set(\Rector\DowngradePhp74\Rector\Array_\DowngradeArraySpreadRector::class);
|
||||
$services->set(\Rector\DowngradePhp74\Rector\FuncCall\DowngradeArrayMergeCallWithoutArgumentsRector::class);
|
||||
$services->set(\Rector\DowngradePhp74\Rector\Identical\DowngradeFreadFwriteFalsyToNegationRector::class);
|
||||
$services->set(\Rector\DowngradePhp74\Rector\Interface_\DowngradePreviouslyImplementedInterfaceRector::class);
|
||||
$services->set(\Rector\DowngradePhp74\Rector\MethodCall\DowngradeReflectionGetTypeRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp74\Rector\Property\DowngradeTypedPropertyRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp74\Rector\ArrowFunction\ArrowFunctionToAnonymousFunctionRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp74\Rector\ClassMethod\DowngradeCovariantReturnTypeRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp74\Rector\ClassMethod\DowngradeContravariantArgumentTypeRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp74\Rector\Coalesce\DowngradeNullCoalescingOperatorRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp74\Rector\LNumber\DowngradeNumericLiteralSeparatorRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp74\Rector\FuncCall\DowngradeStripTagsCallWithArrayRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp74\Rector\Array_\DowngradeArraySpreadRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp74\Rector\FuncCall\DowngradeArrayMergeCallWithoutArgumentsRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp74\Rector\Identical\DowngradeFreadFwriteFalsyToNegationRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp74\Rector\Interface_\DowngradePreviouslyImplementedInterfaceRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp74\Rector\MethodCall\DowngradeReflectionGetTypeRector::class);
|
||||
};
|
||||
|
|
|
@ -37,42 +37,41 @@ use Rector\DowngradePhp80\ValueObject\DowngradeAttributeToAnnotation;
|
|||
use Rector\Removing\Rector\Class_\RemoveInterfacesRector;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->phpVersion(\Rector\Core\ValueObject\PhpVersion::PHP_74);
|
||||
$services = $rectorConfig->services();
|
||||
$services->set(\Rector\Removing\Rector\Class_\RemoveInterfacesRector::class)->configure([
|
||||
$rectorConfig->ruleWithConfiguration(\Rector\Removing\Rector\Class_\RemoveInterfacesRector::class, [
|
||||
// @see https://wiki.php.net/rfc/stringable
|
||||
'Stringable',
|
||||
]);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\MethodCall\DowngradeNamedArgumentRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\Class_\DowngradeAttributeToAnnotationRector::class)->configure([
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\MethodCall\DowngradeNamedArgumentRector::class);
|
||||
$rectorConfig->ruleWithConfiguration(\Rector\DowngradePhp80\Rector\Class_\DowngradeAttributeToAnnotationRector::class, [
|
||||
// Symfony
|
||||
new \Rector\DowngradePhp80\ValueObject\DowngradeAttributeToAnnotation('Symfony\\Contracts\\Service\\Attribute\\Required', 'required'),
|
||||
// Nette
|
||||
new \Rector\DowngradePhp80\ValueObject\DowngradeAttributeToAnnotation('Nette\\DI\\Attributes\\Inject', 'inject'),
|
||||
]);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\ArrayDimFetch\DowngradeDereferenceableOperationRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\Property\DowngradeUnionTypeTypedPropertyRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\FunctionLike\DowngradeUnionTypeDeclarationRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\FunctionLike\DowngradeMixedTypeDeclarationRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\ClassMethod\DowngradeStaticTypeDeclarationRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\ClassMethod\DowngradeAbstractPrivateMethodInTraitRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\Class_\DowngradePropertyPromotionRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\Catch_\DowngradeNonCapturingCatchesRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\FuncCall\DowngradeStrContainsRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\Expression\DowngradeMatchToSwitchRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\ClassConstFetch\DowngradeClassOnObjectToGetClassRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\New_\DowngradeArbitraryExpressionsSupportRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\NullsafeMethodCall\DowngradeNullsafeToTernaryOperatorRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\ClassMethod\DowngradeTrailingCommasInParamUseRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\FuncCall\DowngradeStrStartsWithRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\FuncCall\DowngradeStrEndsWithRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\StaticCall\DowngradePhpTokenRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\Expression\DowngradeThrowExprRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\Instanceof_\DowngradePhp80ResourceReturnToObjectRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\MethodCall\DowngradeReflectionGetAttributesRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\ClassMethod\DowngradeRecursiveDirectoryIteratorHasChildrenRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\MethodCall\DowngradeReflectionPropertyGetDefaultValueRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\MethodCall\DowngradeReflectionClassGetConstantsFilterRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\FuncCall\DowngradeArrayFilterNullableCallbackRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\FuncCall\DowngradeNumberFormatNoFourthArgRector::class);
|
||||
$services->set(\Rector\DowngradePhp80\Rector\ClassMethod\DowngradeStringReturnTypeOnToStringRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\ArrayDimFetch\DowngradeDereferenceableOperationRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\Property\DowngradeUnionTypeTypedPropertyRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\FunctionLike\DowngradeUnionTypeDeclarationRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\FunctionLike\DowngradeMixedTypeDeclarationRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\ClassMethod\DowngradeStaticTypeDeclarationRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\ClassMethod\DowngradeAbstractPrivateMethodInTraitRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\Class_\DowngradePropertyPromotionRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\Catch_\DowngradeNonCapturingCatchesRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\FuncCall\DowngradeStrContainsRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\Expression\DowngradeMatchToSwitchRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\ClassConstFetch\DowngradeClassOnObjectToGetClassRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\New_\DowngradeArbitraryExpressionsSupportRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\NullsafeMethodCall\DowngradeNullsafeToTernaryOperatorRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\ClassMethod\DowngradeTrailingCommasInParamUseRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\FuncCall\DowngradeStrStartsWithRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\FuncCall\DowngradeStrEndsWithRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\StaticCall\DowngradePhpTokenRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\Expression\DowngradeThrowExprRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\Instanceof_\DowngradePhp80ResourceReturnToObjectRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\MethodCall\DowngradeReflectionGetAttributesRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\ClassMethod\DowngradeRecursiveDirectoryIteratorHasChildrenRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\MethodCall\DowngradeReflectionPropertyGetDefaultValueRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\MethodCall\DowngradeReflectionClassGetConstantsFilterRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\FuncCall\DowngradeArrayFilterNullableCallbackRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\FuncCall\DowngradeNumberFormatNoFourthArgRector::class);
|
||||
$rectorConfig->rule(\Rector\DowngradePhp80\Rector\ClassMethod\DowngradeStringReturnTypeOnToStringRector::class);
|
||||
};
|
||||
|
|
|
@ -7,6 +7,5 @@ use Rector\Config\RectorConfig;
|
|||
use Rector\Set\ValueObject\DowngradeLevelSetList;
|
||||
use Rector\Set\ValueObject\DowngradeSetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_53);
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeSetList::PHP_53);
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_53, \Rector\Set\ValueObject\DowngradeSetList::PHP_53]);
|
||||
};
|
||||
|
|
|
@ -7,6 +7,5 @@ use Rector\Config\RectorConfig;
|
|||
use Rector\Set\ValueObject\DowngradeLevelSetList;
|
||||
use Rector\Set\ValueObject\DowngradeSetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_54);
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeSetList::PHP_54);
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_54, \Rector\Set\ValueObject\DowngradeSetList::PHP_54]);
|
||||
};
|
||||
|
|
|
@ -7,6 +7,5 @@ use Rector\Config\RectorConfig;
|
|||
use Rector\Set\ValueObject\DowngradeLevelSetList;
|
||||
use Rector\Set\ValueObject\DowngradeSetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_55);
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeSetList::PHP_55);
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_55, \Rector\Set\ValueObject\DowngradeSetList::PHP_55]);
|
||||
};
|
||||
|
|
|
@ -7,6 +7,5 @@ use Rector\Config\RectorConfig;
|
|||
use Rector\Set\ValueObject\DowngradeLevelSetList;
|
||||
use Rector\Set\ValueObject\DowngradeSetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_56);
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeSetList::PHP_56);
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_56, \Rector\Set\ValueObject\DowngradeSetList::PHP_56]);
|
||||
};
|
||||
|
|
|
@ -7,6 +7,5 @@ use Rector\Config\RectorConfig;
|
|||
use Rector\Set\ValueObject\DowngradeLevelSetList;
|
||||
use Rector\Set\ValueObject\DowngradeSetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_70);
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeSetList::PHP_70);
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_70, \Rector\Set\ValueObject\DowngradeSetList::PHP_70]);
|
||||
};
|
||||
|
|
|
@ -7,6 +7,5 @@ use Rector\Config\RectorConfig;
|
|||
use Rector\Set\ValueObject\DowngradeLevelSetList;
|
||||
use Rector\Set\ValueObject\DowngradeSetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_71);
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeSetList::PHP_71);
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_71, \Rector\Set\ValueObject\DowngradeSetList::PHP_71]);
|
||||
};
|
||||
|
|
|
@ -7,6 +7,5 @@ use Rector\Config\RectorConfig;
|
|||
use Rector\Set\ValueObject\DowngradeLevelSetList;
|
||||
use Rector\Set\ValueObject\DowngradeSetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_72);
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeSetList::PHP_72);
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_72, \Rector\Set\ValueObject\DowngradeSetList::PHP_72]);
|
||||
};
|
||||
|
|
|
@ -7,6 +7,5 @@ use Rector\Config\RectorConfig;
|
|||
use Rector\Set\ValueObject\DowngradeLevelSetList;
|
||||
use Rector\Set\ValueObject\DowngradeSetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_73);
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeSetList::PHP_73);
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_73, \Rector\Set\ValueObject\DowngradeSetList::PHP_73]);
|
||||
};
|
||||
|
|
|
@ -7,6 +7,5 @@ use Rector\Config\RectorConfig;
|
|||
use Rector\Set\ValueObject\DowngradeLevelSetList;
|
||||
use Rector\Set\ValueObject\DowngradeSetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_74);
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeSetList::PHP_74);
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_74, \Rector\Set\ValueObject\DowngradeSetList::PHP_74]);
|
||||
};
|
||||
|
|
|
@ -7,6 +7,5 @@ use Rector\Config\RectorConfig;
|
|||
use Rector\Set\ValueObject\DowngradeLevelSetList;
|
||||
use Rector\Set\ValueObject\DowngradeSetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_80);
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeSetList::PHP_80);
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_80, \Rector\Set\ValueObject\DowngradeSetList::PHP_80]);
|
||||
};
|
||||
|
|
|
@ -6,5 +6,5 @@ namespace RectorPrefix20220420;
|
|||
use Rector\Config\RectorConfig;
|
||||
use Rector\Set\ValueObject\DowngradeSetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\DowngradeSetList::PHP_81);
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\DowngradeSetList::PHP_81]);
|
||||
};
|
||||
|
|
|
@ -7,8 +7,7 @@ use Rector\Config\RectorConfig;
|
|||
use Rector\Core\ValueObject\PhpVersion;
|
||||
use Rector\Set\ValueObject\SetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\SetList::PHP_54);
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\SetList::PHP_53);
|
||||
// parameter must be defined after import, to override impored param version
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\SetList::PHP_54, \Rector\Set\ValueObject\SetList::PHP_53]);
|
||||
// parameter must be defined after import, to override imported param version
|
||||
$rectorConfig->phpVersion(\Rector\Core\ValueObject\PhpVersion::PHP_54);
|
||||
};
|
||||
|
|
|
@ -8,8 +8,7 @@ use Rector\Core\ValueObject\PhpVersion;
|
|||
use Rector\Set\ValueObject\LevelSetList;
|
||||
use Rector\Set\ValueObject\SetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\SetList::PHP_55);
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_54);
|
||||
// parameter must be defined after import, to override impored param version
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\SetList::PHP_55, \Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_54]);
|
||||
// parameter must be defined after import, to override imported param version
|
||||
$rectorConfig->phpVersion(\Rector\Core\ValueObject\PhpVersion::PHP_55);
|
||||
};
|
||||
|
|
|
@ -8,8 +8,7 @@ use Rector\Core\ValueObject\PhpVersion;
|
|||
use Rector\Set\ValueObject\LevelSetList;
|
||||
use Rector\Set\ValueObject\SetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\SetList::PHP_56);
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_55);
|
||||
// parameter must be defined after import, to override impored param version
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\SetList::PHP_56, \Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_55]);
|
||||
// parameter must be defined after import, to override imported param version
|
||||
$rectorConfig->phpVersion(\Rector\Core\ValueObject\PhpVersion::PHP_56);
|
||||
};
|
||||
|
|
|
@ -8,8 +8,7 @@ use Rector\Core\ValueObject\PhpVersion;
|
|||
use Rector\Set\ValueObject\LevelSetList;
|
||||
use Rector\Set\ValueObject\SetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\SetList::PHP_70);
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_56);
|
||||
// parameter must be defined after import, to override impored param version
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\SetList::PHP_70, \Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_56]);
|
||||
// parameter must be defined after import, to override imported param version
|
||||
$rectorConfig->phpVersion(\Rector\Core\ValueObject\PhpVersion::PHP_70);
|
||||
};
|
||||
|
|
|
@ -8,8 +8,7 @@ use Rector\Core\ValueObject\PhpVersion;
|
|||
use Rector\Set\ValueObject\LevelSetList;
|
||||
use Rector\Set\ValueObject\SetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\SetList::PHP_71);
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_70);
|
||||
// parameter must be defined after import, to override impored param version
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\SetList::PHP_71, \Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_70]);
|
||||
// parameter must be defined after import, to override imported param version
|
||||
$rectorConfig->phpVersion(\Rector\Core\ValueObject\PhpVersion::PHP_71);
|
||||
};
|
||||
|
|
|
@ -8,8 +8,7 @@ use Rector\Core\ValueObject\PhpVersion;
|
|||
use Rector\Set\ValueObject\LevelSetList;
|
||||
use Rector\Set\ValueObject\SetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\SetList::PHP_72);
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_71);
|
||||
// parameter must be defined after import, to override impored param version
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\SetList::PHP_72, \Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_71]);
|
||||
// parameter must be defined after import, to override imported param version
|
||||
$rectorConfig->phpVersion(\Rector\Core\ValueObject\PhpVersion::PHP_72);
|
||||
};
|
||||
|
|
|
@ -8,8 +8,7 @@ use Rector\Core\ValueObject\PhpVersion;
|
|||
use Rector\Set\ValueObject\LevelSetList;
|
||||
use Rector\Set\ValueObject\SetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\SetList::PHP_73);
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_72);
|
||||
// parameter must be defined after import, to override impored param version
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\SetList::PHP_73, \Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_72]);
|
||||
// parameter must be defined after import, to override imported param version
|
||||
$rectorConfig->phpVersion(\Rector\Core\ValueObject\PhpVersion::PHP_73);
|
||||
};
|
||||
|
|
|
@ -8,8 +8,7 @@ use Rector\Core\ValueObject\PhpVersion;
|
|||
use Rector\Set\ValueObject\LevelSetList;
|
||||
use Rector\Set\ValueObject\SetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\SetList::PHP_74);
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_73);
|
||||
// parameter must be defined after import, to override impored param version
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\SetList::PHP_74, \Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_73]);
|
||||
// parameter must be defined after import, to override imported param version
|
||||
$rectorConfig->phpVersion(\Rector\Core\ValueObject\PhpVersion::PHP_74);
|
||||
};
|
||||
|
|
|
@ -8,8 +8,7 @@ use Rector\Core\ValueObject\PhpVersion;
|
|||
use Rector\Set\ValueObject\LevelSetList;
|
||||
use Rector\Set\ValueObject\SetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\SetList::PHP_80);
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_74);
|
||||
// parameter must be defined after import, to override impored param version
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\SetList::PHP_80, \Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_74]);
|
||||
// parameter must be defined after import, to override imported param version
|
||||
$rectorConfig->phpVersion(\Rector\Core\ValueObject\PhpVersion::PHP_80);
|
||||
};
|
||||
|
|
|
@ -8,8 +8,7 @@ use Rector\Core\ValueObject\PhpVersion;
|
|||
use Rector\Set\ValueObject\LevelSetList;
|
||||
use Rector\Set\ValueObject\SetList;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\SetList::PHP_81);
|
||||
$rectorConfig->import(\Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_80);
|
||||
// parameter must be defined after import, to override impored param version
|
||||
$rectorConfig->sets([\Rector\Set\ValueObject\SetList::PHP_81, \Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_80]);
|
||||
// parameter must be defined after import, to override imported param version
|
||||
$rectorConfig->phpVersion(\Rector\Core\ValueObject\PhpVersion::PHP_81);
|
||||
};
|
||||
|
|
|
@ -8,6 +8,5 @@ use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
|||
use Rector\Renaming\ValueObject\MethodCallRename;
|
||||
# https://github.com/Seldaek/monolog/commit/39f8a20e6dadc0194e846b254c5f23d1c732290b#diff-dce565f403e044caa5e6a0d988339430
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$services = $rectorConfig->services();
|
||||
$services->set(\Rector\Renaming\Rector\MethodCall\RenameMethodRector::class)->configure([new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addDebug', 'debug'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addInfo', 'info'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addNotice', 'notice'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addWarning', 'warning'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addError', 'error'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addCritical', 'critical'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addAlert', 'alert'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addEmergency', 'emergency'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'warn', 'warning'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'err', 'error'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'crit', 'critical'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'emerg', 'emergency')]);
|
||||
$rectorConfig->ruleWithConfiguration(\Rector\Renaming\Rector\MethodCall\RenameMethodRector::class, [new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addDebug', 'debug'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addInfo', 'info'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addNotice', 'notice'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addWarning', 'warning'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addError', 'error'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addCritical', 'critical'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addAlert', 'alert'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'addEmergency', 'emergency'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'warn', 'warning'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'err', 'error'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'crit', 'critical'), new \Rector\Renaming\ValueObject\MethodCallRename('Monolog\\Logger', 'emerg', 'emergency')]);
|
||||
};
|
||||
|
|
|
@ -15,18 +15,17 @@ use Rector\Removing\ValueObject\RemoveFuncCallArg;
|
|||
use Rector\Renaming\Rector\ConstFetch\RenameConstantRector;
|
||||
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$services = $rectorConfig->services();
|
||||
# https://stackoverflow.com/a/1390625/1348344
|
||||
# https://github.com/philip/MySQLConverterTool/blob/master/Converter.php
|
||||
# https://www.phpclasses.org/blog/package/9199/post/3-Smoothly-Migrate-your-PHP-Code-using-the-Old-MySQL-extension-to-MySQLi.html
|
||||
$services->set(\Rector\MysqlToMysqli\Rector\Assign\MysqlAssignToMysqliRector::class);
|
||||
$services->set(\Rector\MysqlToMysqli\Rector\FuncCall\MysqlFuncCallToMysqliRector::class);
|
||||
$services->set(\Rector\Removing\Rector\FuncCall\RemoveFuncCallArgRector::class)->configure([new \Rector\Removing\ValueObject\RemoveFuncCallArg('mysql_pconnect', 3), new \Rector\Removing\ValueObject\RemoveFuncCallArg('mysql_connect', 3), new \Rector\Removing\ValueObject\RemoveFuncCallArg('mysql_connect', 4)]);
|
||||
$services->set(\Rector\MysqlToMysqli\Rector\FuncCall\MysqlPConnectToMysqliConnectRector::class);
|
||||
$rectorConfig->rule(\Rector\MysqlToMysqli\Rector\Assign\MysqlAssignToMysqliRector::class);
|
||||
$rectorConfig->rule(\Rector\MysqlToMysqli\Rector\FuncCall\MysqlFuncCallToMysqliRector::class);
|
||||
$rectorConfig->ruleWithConfiguration(\Rector\Removing\Rector\FuncCall\RemoveFuncCallArgRector::class, [new \Rector\Removing\ValueObject\RemoveFuncCallArg('mysql_pconnect', 3), new \Rector\Removing\ValueObject\RemoveFuncCallArg('mysql_connect', 3), new \Rector\Removing\ValueObject\RemoveFuncCallArg('mysql_connect', 4)]);
|
||||
$rectorConfig->rule(\Rector\MysqlToMysqli\Rector\FuncCall\MysqlPConnectToMysqliConnectRector::class);
|
||||
# first swap arguments, then rename
|
||||
$services->set(\Rector\Arguments\Rector\FuncCall\SwapFuncCallArgumentsRector::class)->configure([new \Rector\Arguments\ValueObject\SwapFuncCallArguments('mysql_query', [1, 0]), new \Rector\Arguments\ValueObject\SwapFuncCallArguments('mysql_real_escape_string', [1, 0]), new \Rector\Arguments\ValueObject\SwapFuncCallArguments('mysql_select_db', [1, 0]), new \Rector\Arguments\ValueObject\SwapFuncCallArguments('mysql_set_charset', [1, 0])]);
|
||||
$services->set(\Rector\Renaming\Rector\FuncCall\RenameFunctionRector::class)->configure(['mysql_connect' => 'mysqli_connect', 'mysql_data_seek' => 'mysqli_data_seek', 'mysql_fetch_array' => 'mysqli_fetch_array', 'mysql_fetch_assoc' => 'mysqli_fetch_assoc', 'mysql_fetch_lengths' => 'mysqli_fetch_lengths', 'mysql_fetch_object' => 'mysqli_fetch_object', 'mysql_fetch_row' => 'mysqli_fetch_row', 'mysql_field_seek' => 'mysqli_field_seek', 'mysql_free_result' => 'mysqli_free_result', 'mysql_get_client_info' => 'mysqli_get_client_info', 'mysql_num_fields' => 'mysqli_num_fields', 'mysql_numfields' => 'mysqli_num_fields', 'mysql_num_rows' => 'mysqli_num_rows', 'mysql_numrows' => 'mysqli_num_rows']);
|
||||
$rectorConfig->ruleWithConfiguration(\Rector\Arguments\Rector\FuncCall\SwapFuncCallArgumentsRector::class, [new \Rector\Arguments\ValueObject\SwapFuncCallArguments('mysql_query', [1, 0]), new \Rector\Arguments\ValueObject\SwapFuncCallArguments('mysql_real_escape_string', [1, 0]), new \Rector\Arguments\ValueObject\SwapFuncCallArguments('mysql_select_db', [1, 0]), new \Rector\Arguments\ValueObject\SwapFuncCallArguments('mysql_set_charset', [1, 0])]);
|
||||
$rectorConfig->ruleWithConfiguration(\Rector\Renaming\Rector\FuncCall\RenameFunctionRector::class, ['mysql_connect' => 'mysqli_connect', 'mysql_data_seek' => 'mysqli_data_seek', 'mysql_fetch_array' => 'mysqli_fetch_array', 'mysql_fetch_assoc' => 'mysqli_fetch_assoc', 'mysql_fetch_lengths' => 'mysqli_fetch_lengths', 'mysql_fetch_object' => 'mysqli_fetch_object', 'mysql_fetch_row' => 'mysqli_fetch_row', 'mysql_field_seek' => 'mysqli_field_seek', 'mysql_free_result' => 'mysqli_free_result', 'mysql_get_client_info' => 'mysqli_get_client_info', 'mysql_num_fields' => 'mysqli_num_fields', 'mysql_numfields' => 'mysqli_num_fields', 'mysql_num_rows' => 'mysqli_num_rows', 'mysql_numrows' => 'mysqli_num_rows']);
|
||||
# http://php.net/manual/en/mysql.constants.php → http://php.net/manual/en/mysqli.constants.php
|
||||
$services->set(\Rector\Renaming\Rector\ConstFetch\RenameConstantRector::class)->configure(['MYSQL_ASSOC' => 'MYSQLI_ASSOC', 'MYSQL_BOTH' => 'MYSQLI_BOTH', 'MYSQL_CLIENT_COMPRESS' => 'MYSQLI_CLIENT_COMPRESS', 'MYSQL_CLIENT_IGNORE_SPACE' => 'MYSQLI_CLIENT_IGNORE_SPACE', 'MYSQL_CLIENT_INTERACTIVE' => 'MYSQLI_CLIENT_INTERACTIVE', 'MYSQL_CLIENT_SSL' => 'MYSQLI_CLIENT_SSL', 'MYSQL_NUM' => 'MYSQLI_NUM', 'MYSQL_PRIMARY_KEY_FLAG' => 'MYSQLI_PRI_KEY_FLAG']);
|
||||
$services->set(\Rector\MysqlToMysqli\Rector\FuncCall\MysqlQueryMysqlErrorWithLinkRector::class);
|
||||
$rectorConfig->ruleWithConfiguration(\Rector\Renaming\Rector\ConstFetch\RenameConstantRector::class, ['MYSQL_ASSOC' => 'MYSQLI_ASSOC', 'MYSQL_BOTH' => 'MYSQLI_BOTH', 'MYSQL_CLIENT_COMPRESS' => 'MYSQLI_CLIENT_COMPRESS', 'MYSQL_CLIENT_IGNORE_SPACE' => 'MYSQLI_CLIENT_IGNORE_SPACE', 'MYSQL_CLIENT_INTERACTIVE' => 'MYSQLI_CLIENT_INTERACTIVE', 'MYSQL_CLIENT_SSL' => 'MYSQLI_CLIENT_SSL', 'MYSQL_NUM' => 'MYSQLI_NUM', 'MYSQL_PRIMARY_KEY_FLAG' => 'MYSQLI_PRI_KEY_FLAG']);
|
||||
$rectorConfig->rule(\Rector\MysqlToMysqli\Rector\FuncCall\MysqlQueryMysqlErrorWithLinkRector::class);
|
||||
};
|
||||
|
|
|
@ -13,13 +13,12 @@ use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector;
|
|||
use Rector\Php71\Rector\List_\ListToArrayDestructRector;
|
||||
use Rector\Php71\Rector\TryCatch\MultiExceptionCatchRector;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$services = $rectorConfig->services();
|
||||
$services->set(\Rector\Php71\Rector\BooleanOr\IsIterableRector::class);
|
||||
$services->set(\Rector\Php71\Rector\TryCatch\MultiExceptionCatchRector::class);
|
||||
$services->set(\Rector\Php71\Rector\Assign\AssignArrayToStringRector::class);
|
||||
$services->set(\Rector\Php71\Rector\FuncCall\CountOnNullRector::class);
|
||||
$services->set(\Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector::class);
|
||||
$services->set(\Rector\Php71\Rector\BinaryOp\BinaryOpBetweenNumberAndStringRector::class);
|
||||
$services->set(\Rector\Php71\Rector\List_\ListToArrayDestructRector::class);
|
||||
$services->set(\Rector\Php71\Rector\ClassConst\PublicConstantVisibilityRector::class);
|
||||
$rectorConfig->rule(\Rector\Php71\Rector\BooleanOr\IsIterableRector::class);
|
||||
$rectorConfig->rule(\Rector\Php71\Rector\TryCatch\MultiExceptionCatchRector::class);
|
||||
$rectorConfig->rule(\Rector\Php71\Rector\Assign\AssignArrayToStringRector::class);
|
||||
$rectorConfig->rule(\Rector\Php71\Rector\FuncCall\CountOnNullRector::class);
|
||||
$rectorConfig->rule(\Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector::class);
|
||||
$rectorConfig->rule(\Rector\Php71\Rector\BinaryOp\BinaryOpBetweenNumberAndStringRector::class);
|
||||
$rectorConfig->rule(\Rector\Php71\Rector\List_\ListToArrayDestructRector::class);
|
||||
$rectorConfig->rule(\Rector\Php71\Rector\ClassConst\PublicConstantVisibilityRector::class);
|
||||
};
|
||||
|
|
|
@ -16,12 +16,11 @@ use Rector\Php72\Rector\Unset_\UnsetCastRector;
|
|||
use Rector\Php72\Rector\While_\WhileEachToForeachRector;
|
||||
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$services = $rectorConfig->services();
|
||||
$services->set(\Rector\Php72\Rector\While_\WhileEachToForeachRector::class);
|
||||
$services->set(\Rector\Php72\Rector\Assign\ListEachRector::class);
|
||||
$services->set(\Rector\Php72\Rector\Assign\ReplaceEachAssignmentWithKeyCurrentRector::class);
|
||||
$services->set(\Rector\Php72\Rector\Unset_\UnsetCastRector::class);
|
||||
$services->set(\Rector\Renaming\Rector\FuncCall\RenameFunctionRector::class)->configure([
|
||||
$rectorConfig->rule(\Rector\Php72\Rector\While_\WhileEachToForeachRector::class);
|
||||
$rectorConfig->rule(\Rector\Php72\Rector\Assign\ListEachRector::class);
|
||||
$rectorConfig->rule(\Rector\Php72\Rector\Assign\ReplaceEachAssignmentWithKeyCurrentRector::class);
|
||||
$rectorConfig->rule(\Rector\Php72\Rector\Unset_\UnsetCastRector::class);
|
||||
$rectorConfig->ruleWithConfiguration(\Rector\Renaming\Rector\FuncCall\RenameFunctionRector::class, [
|
||||
# and imagewbmp
|
||||
'jpeg2wbmp' => 'imagecreatefromjpeg',
|
||||
# or imagewbmp
|
||||
|
@ -32,10 +31,10 @@ return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
|||
'gmp_random' => 'gmp_random_bits',
|
||||
'read_exif_data' => 'exif_read_data',
|
||||
]);
|
||||
$services->set(\Rector\Php72\Rector\FuncCall\GetClassOnNullRector::class);
|
||||
$services->set(\Rector\Php72\Rector\FuncCall\IsObjectOnIncompleteClassRector::class);
|
||||
$services->set(\Rector\Php72\Rector\FuncCall\ParseStrWithResultArgumentRector::class);
|
||||
$services->set(\Rector\Php72\Rector\FuncCall\StringsAssertNakedRector::class);
|
||||
$services->set(\Rector\Php72\Rector\FuncCall\CreateFunctionToAnonymousFunctionRector::class);
|
||||
$services->set(\Rector\Php72\Rector\FuncCall\StringifyDefineRector::class);
|
||||
$rectorConfig->rule(\Rector\Php72\Rector\FuncCall\GetClassOnNullRector::class);
|
||||
$rectorConfig->rule(\Rector\Php72\Rector\FuncCall\IsObjectOnIncompleteClassRector::class);
|
||||
$rectorConfig->rule(\Rector\Php72\Rector\FuncCall\ParseStrWithResultArgumentRector::class);
|
||||
$rectorConfig->rule(\Rector\Php72\Rector\FuncCall\StringsAssertNakedRector::class);
|
||||
$rectorConfig->rule(\Rector\Php72\Rector\FuncCall\CreateFunctionToAnonymousFunctionRector::class);
|
||||
$rectorConfig->rule(\Rector\Php72\Rector\FuncCall\StringifyDefineRector::class);
|
||||
};
|
||||
|
|
|
@ -16,13 +16,12 @@ use Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector;
|
|||
use Rector\Php73\Rector\String_\SensitiveHereNowDocRector;
|
||||
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$services = $rectorConfig->services();
|
||||
$services->set(\Rector\Php73\Rector\BooleanOr\IsCountableRector::class);
|
||||
$services->set(\Rector\Php73\Rector\FuncCall\ArrayKeyFirstLastRector::class);
|
||||
$services->set(\Rector\Php73\Rector\FuncCall\SensitiveDefineRector::class);
|
||||
$services->set(\Rector\Php73\Rector\ConstFetch\SensitiveConstantNameRector::class);
|
||||
$services->set(\Rector\Php73\Rector\String_\SensitiveHereNowDocRector::class);
|
||||
$services->set(\Rector\Renaming\Rector\FuncCall\RenameFunctionRector::class)->configure([
|
||||
$rectorConfig->rule(\Rector\Php73\Rector\BooleanOr\IsCountableRector::class);
|
||||
$rectorConfig->rule(\Rector\Php73\Rector\FuncCall\ArrayKeyFirstLastRector::class);
|
||||
$rectorConfig->rule(\Rector\Php73\Rector\FuncCall\SensitiveDefineRector::class);
|
||||
$rectorConfig->rule(\Rector\Php73\Rector\ConstFetch\SensitiveConstantNameRector::class);
|
||||
$rectorConfig->rule(\Rector\Php73\Rector\String_\SensitiveHereNowDocRector::class);
|
||||
$rectorConfig->ruleWithConfiguration(\Rector\Renaming\Rector\FuncCall\RenameFunctionRector::class, [
|
||||
# https://wiki.php.net/rfc/deprecations_php_7_3
|
||||
'image2wbmp' => 'imagewbmp',
|
||||
'mbregex_encoding' => 'mb_regex_encoding',
|
||||
|
@ -39,9 +38,9 @@ return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
|||
'mbereg_search_getregs' => 'mb_ereg_search_getregs',
|
||||
'mbereg_search_getpos' => 'mb_ereg_search_getpos',
|
||||
]);
|
||||
$services->set(\Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector::class);
|
||||
$services->set(\Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector::class);
|
||||
$services->set(\Rector\Php73\Rector\FuncCall\RegexDashEscapeRector::class);
|
||||
$services->set(\Rector\Php52\Rector\Switch_\ContinueToBreakInSwitchRector::class);
|
||||
$services->set(\Rector\Php73\Rector\FuncCall\SetCookieRector::class);
|
||||
$rectorConfig->rule(\Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector::class);
|
||||
$rectorConfig->rule(\Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector::class);
|
||||
$rectorConfig->rule(\Rector\Php73\Rector\FuncCall\RegexDashEscapeRector::class);
|
||||
$rectorConfig->rule(\Rector\Php52\Rector\Switch_\ContinueToBreakInSwitchRector::class);
|
||||
$rectorConfig->rule(\Rector\Php73\Rector\FuncCall\SetCookieRector::class);
|
||||
};
|
||||
|
|
|
@ -20,9 +20,8 @@ use Rector\Php74\Rector\Property\TypedPropertyRector;
|
|||
use Rector\Php74\Rector\StaticCall\ExportToReflectionFunctionRector;
|
||||
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
|
||||
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
||||
$services = $rectorConfig->services();
|
||||
$services->set(\Rector\Php74\Rector\Property\TypedPropertyRector::class);
|
||||
$services->set(\Rector\Renaming\Rector\FuncCall\RenameFunctionRector::class)->configure([
|
||||
$rectorConfig->rule(\Rector\Php74\Rector\Property\TypedPropertyRector::class);
|
||||
$rectorConfig->ruleWithConfiguration(\Rector\Renaming\Rector\FuncCall\RenameFunctionRector::class, [
|
||||
#the_real_type
|
||||
# https://wiki.php.net/rfc/deprecations_php_7_4
|
||||
'is_real' => 'is_float',
|
||||
|
@ -30,17 +29,17 @@ return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
|||
# https://wiki.php.net/rfc/deprecations_php_7_4
|
||||
'apache_request_headers' => 'getallheaders',
|
||||
]);
|
||||
$services->set(\Rector\Php74\Rector\FuncCall\ArrayKeyExistsOnPropertyRector::class);
|
||||
$services->set(\Rector\Php74\Rector\FuncCall\FilterVarToAddSlashesRector::class);
|
||||
$services->set(\Rector\Php74\Rector\StaticCall\ExportToReflectionFunctionRector::class);
|
||||
$services->set(\Rector\Php74\Rector\FuncCall\MbStrrposEncodingArgumentPositionRector::class);
|
||||
$services->set(\Rector\Php74\Rector\Double\RealToFloatTypeCastRector::class);
|
||||
$services->set(\Rector\Php74\Rector\Assign\NullCoalescingOperatorRector::class);
|
||||
$services->set(\Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector::class);
|
||||
$services->set(\Rector\Php74\Rector\FuncCall\ArraySpreadInsteadOfArrayMergeRector::class);
|
||||
$services->set(\Rector\Php74\Rector\LNumber\AddLiteralSeparatorToNumberRector::class);
|
||||
$services->set(\Rector\Php74\Rector\MethodCall\ChangeReflectionTypeToStringToGetNameRector::class);
|
||||
$services->set(\Rector\Php74\Rector\Property\RestoreDefaultNullToNullableTypePropertyRector::class);
|
||||
$services->set(\Rector\Php74\Rector\ArrayDimFetch\CurlyToSquareBracketArrayStringRector::class);
|
||||
$services->set(\Rector\Php74\Rector\Function_\ReservedFnFunctionRector::class);
|
||||
$rectorConfig->rule(\Rector\Php74\Rector\FuncCall\ArrayKeyExistsOnPropertyRector::class);
|
||||
$rectorConfig->rule(\Rector\Php74\Rector\FuncCall\FilterVarToAddSlashesRector::class);
|
||||
$rectorConfig->rule(\Rector\Php74\Rector\StaticCall\ExportToReflectionFunctionRector::class);
|
||||
$rectorConfig->rule(\Rector\Php74\Rector\FuncCall\MbStrrposEncodingArgumentPositionRector::class);
|
||||
$rectorConfig->rule(\Rector\Php74\Rector\Double\RealToFloatTypeCastRector::class);
|
||||
$rectorConfig->rule(\Rector\Php74\Rector\Assign\NullCoalescingOperatorRector::class);
|
||||
$rectorConfig->rule(\Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector::class);
|
||||
$rectorConfig->rule(\Rector\Php74\Rector\FuncCall\ArraySpreadInsteadOfArrayMergeRector::class);
|
||||
$rectorConfig->rule(\Rector\Php74\Rector\LNumber\AddLiteralSeparatorToNumberRector::class);
|
||||
$rectorConfig->rule(\Rector\Php74\Rector\MethodCall\ChangeReflectionTypeToStringToGetNameRector::class);
|
||||
$rectorConfig->rule(\Rector\Php74\Rector\Property\RestoreDefaultNullToNullableTypePropertyRector::class);
|
||||
$rectorConfig->rule(\Rector\Php74\Rector\ArrayDimFetch\CurlyToSquareBracketArrayStringRector::class);
|
||||
$rectorConfig->rule(\Rector\Php74\Rector\Function_\ReservedFnFunctionRector::class);
|
||||
};
|
||||
|
|
|
@ -16,11 +16,11 @@ final class VersionResolver
|
|||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'f5aadc590ce9f00be25617f9585b17c0f19bf529';
|
||||
public const PACKAGE_VERSION = '91f6470cbc909d5dc6055accd74bfe99795a72c2';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2022-04-20 17:54:25';
|
||||
public const RELEASE_DATE = '2022-04-20 18:23:30';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
|
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
|
@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
|||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit91ee4c12b1c3dd4fc5887a59fc92f2ac::getLoader();
|
||||
return ComposerAutoloaderInitf679020927482de2771b6bffb53f16c8::getLoader();
|
||||
|
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit91ee4c12b1c3dd4fc5887a59fc92f2ac
|
||||
class ComposerAutoloaderInitf679020927482de2771b6bffb53f16c8
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,19 +22,19 @@ class ComposerAutoloaderInit91ee4c12b1c3dd4fc5887a59fc92f2ac
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit91ee4c12b1c3dd4fc5887a59fc92f2ac', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitf679020927482de2771b6bffb53f16c8', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit91ee4c12b1c3dd4fc5887a59fc92f2ac', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitf679020927482de2771b6bffb53f16c8', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit91ee4c12b1c3dd4fc5887a59fc92f2ac::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitf679020927482de2771b6bffb53f16c8::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit91ee4c12b1c3dd4fc5887a59fc92f2ac::$files;
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInitf679020927482de2771b6bffb53f16c8::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire91ee4c12b1c3dd4fc5887a59fc92f2ac($fileIdentifier, $file);
|
||||
composerRequiref679020927482de2771b6bffb53f16c8($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
|
@ -46,7 +46,7 @@ class ComposerAutoloaderInit91ee4c12b1c3dd4fc5887a59fc92f2ac
|
|||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequire91ee4c12b1c3dd4fc5887a59fc92f2ac($fileIdentifier, $file)
|
||||
function composerRequiref679020927482de2771b6bffb53f16c8($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit91ee4c12b1c3dd4fc5887a59fc92f2ac
|
||||
class ComposerStaticInitf679020927482de2771b6bffb53f16c8
|
||||
{
|
||||
public static $files = array (
|
||||
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
||||
|
@ -3869,9 +3869,9 @@ class ComposerStaticInit91ee4c12b1c3dd4fc5887a59fc92f2ac
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit91ee4c12b1c3dd4fc5887a59fc92f2ac::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit91ee4c12b1c3dd4fc5887a59fc92f2ac::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit91ee4c12b1c3dd4fc5887a59fc92f2ac::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitf679020927482de2771b6bffb53f16c8::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitf679020927482de2771b6bffb53f16c8::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitf679020927482de2771b6bffb53f16c8::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
10
vendor/scoper-autoload.php
vendored
10
vendor/scoper-autoload.php
vendored
|
@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php';
|
|||
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
|
||||
spl_autoload_call('RectorPrefix20220420\AutoloadIncluder');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInit91ee4c12b1c3dd4fc5887a59fc92f2ac', false) && !interface_exists('ComposerAutoloaderInit91ee4c12b1c3dd4fc5887a59fc92f2ac', false) && !trait_exists('ComposerAutoloaderInit91ee4c12b1c3dd4fc5887a59fc92f2ac', false)) {
|
||||
spl_autoload_call('RectorPrefix20220420\ComposerAutoloaderInit91ee4c12b1c3dd4fc5887a59fc92f2ac');
|
||||
if (!class_exists('ComposerAutoloaderInitf679020927482de2771b6bffb53f16c8', false) && !interface_exists('ComposerAutoloaderInitf679020927482de2771b6bffb53f16c8', false) && !trait_exists('ComposerAutoloaderInitf679020927482de2771b6bffb53f16c8', false)) {
|
||||
spl_autoload_call('RectorPrefix20220420\ComposerAutoloaderInitf679020927482de2771b6bffb53f16c8');
|
||||
}
|
||||
if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) {
|
||||
spl_autoload_call('RectorPrefix20220420\Helmich\TypoScriptParser\Parser\AST\Statement');
|
||||
|
@ -59,9 +59,9 @@ if (!function_exists('print_node')) {
|
|||
return \RectorPrefix20220420\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequire91ee4c12b1c3dd4fc5887a59fc92f2ac')) {
|
||||
function composerRequire91ee4c12b1c3dd4fc5887a59fc92f2ac() {
|
||||
return \RectorPrefix20220420\composerRequire91ee4c12b1c3dd4fc5887a59fc92f2ac(...func_get_args());
|
||||
if (!function_exists('composerRequiref679020927482de2771b6bffb53f16c8')) {
|
||||
function composerRequiref679020927482de2771b6bffb53f16c8() {
|
||||
return \RectorPrefix20220420\composerRequiref679020927482de2771b6bffb53f16c8(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('scanPath')) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user