From 1f621e91a4db4c99a508fe7b33392ec3d5197967 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Fri, 2 Jun 2023 12:32:12 +0000 Subject: [PATCH] Updated Rector to commit 88eed987cc361166359c158ffd22d264d165aa8b https://github.com/rectorphp/rector-src/commit/88eed987cc361166359c158ffd22d264d165aa8b Ensure check isFirstClassCallable() before node->getArgs() on CallLike (#4049) --- .../Rector/MethodCall/RemoveMethodCallParamRector.php | 3 +++ .../Rector/Catch_/ThrowWithPreviousExceptionRector.php | 3 +++ .../OptionalParametersAfterRequiredRector.php | 6 ++++++ .../Rector/FuncCall/BoolvalToTypeCastRector.php | 3 +++ .../CallUserFuncWithArrowFunctionToInlineRector.php | 3 +++ .../Rector/FuncCall/FloatvalToTypeCastRector.php | 6 +++--- .../FuncCall/IsAWithStringWithThirdArgumentRector.php | 3 +++ .../Rector/FuncCall/RemoveSoleValueSprintfRector.php | 3 +++ .../Rector/FuncCall/SimplifyFuncGetArgsCountRector.php | 3 +++ .../Rector/FuncCall/SimplifyInArrayValuesRector.php | 3 +++ .../Rector/FuncCall/SimplifyStrposLowerRector.php | 3 +++ .../Rector/FuncCall/SingleInArrayToCompareRector.php | 3 +++ .../Rector/Identical/GetClassToInstanceOfRector.php | 3 +++ .../Rector/If_/ExplicitBoolCompareRector.php | 3 +++ .../Class_/AddArrayDefaultToArrayPropertyRector.php | 3 +++ .../Rector/FuncCall/CallUserFuncToMethodCallRector.php | 3 +++ .../Rector/FuncCall/ConsistentImplodeRector.php | 3 +++ .../CountArrayToEmptyArrayComparisonRector.php | 3 +++ rules/DeadCode/NodeManipulator/CountManipulator.php | 3 +++ .../Rector/FuncCall/MysqlFuncCallToMysqliRector.php | 6 ++++++ .../FuncCall/MysqlPConnectToMysqliConnectRector.php | 3 +++ .../FuncCall/MysqlQueryMysqlErrorWithLinkRector.php | 3 +++ rules/Naming/Naming/VariableNaming.php | 3 +++ .../DirNameFileConstantToDirConstantRector.php | 3 +++ rules/Php70/Rector/FuncCall/EregToPregMatchRector.php | 3 +++ rules/Php70/Rector/FuncCall/MultiDirnameRector.php | 3 +++ rules/Php71/IsArrayAndDualCheckToAble.php | 3 +++ rules/Php71/Rector/FuncCall/CountOnNullRector.php | 3 +++ .../ReplaceEachAssignmentWithKeyCurrentRector.php | 3 +++ rules/Php72/Rector/FuncCall/GetClassOnNullRector.php | 3 +++ rules/Php72/Rector/FuncCall/StringifyDefineRector.php | 3 +++ .../Php72/Rector/FuncCall/StringsAssertNakedRector.php | 3 +++ rules/Php72/Rector/While_/WhileEachToForeachRector.php | 3 +++ .../Php73/Rector/FuncCall/ArrayKeyFirstLastRector.php | 6 ++++++ rules/Php73/Rector/FuncCall/JsonThrowOnErrorRector.php | 3 +++ rules/Php73/Rector/FuncCall/SetCookieRector.php | 3 +++ .../FuncCall/ArraySpreadInsteadOfArrayMergeRector.php | 3 +++ .../FuncCall/MoneyFormatToNumberFormatRector.php | 3 +++ .../StaticCall/ExportToReflectionFunctionRector.php | 3 +++ .../SubstrMatchAndRefactor.php | 9 ++++++--- rules/Php80/NodeManipulator/ResourceReturnToObject.php | 3 +++ rules/Php80/Rector/FuncCall/ClassOnObjectRector.php | 3 +++ rules/Php80/Rector/NotIdentical/StrContainsRector.php | 3 +++ rules/Php80/Rector/Ternary/GetDebugTypeRector.php | 3 +++ .../Php80/ValueObjectFactory/StrStartsWithFactory.php | 3 +++ rules/Php81/NodeAnalyzer/ComplexNewAnalyzer.php | 3 +++ .../Rector/MethodCall/MethodCallToFuncCallRector.php | 3 +++ .../Transform/Rector/New_/NewArgToMethodCallRector.php | 3 +++ src/Application/VersionResolver.php | 4 ++-- vendor/autoload.php | 2 +- vendor/composer/autoload_real.php | 10 +++++----- vendor/composer/autoload_static.php | 8 ++++---- vendor/composer/installed.json | 8 ++++---- vendor/composer/installed.php | 2 +- .../rector/extension-installer/src/GeneratedConfig.php | 2 +- .../src/NodeFactory/ArgumentShiftingFactory.php | 3 +++ .../src/NodeFactory/ExpectExceptionCodeFactory.php | 3 +++ .../src/NodeFactory/ExpectExceptionFactory.php | 3 +++ .../src/NodeFactory/ExpectExceptionMessageFactory.php | 3 +++ .../ExpectExceptionMessageRegExpFactory.php | 3 +++ .../src/NodeManipulator/ArgumentMover.php | 3 +++ .../ClassMethod/CreateMockToAnonymousClassRector.php | 6 ++++++ .../Class_/ArrayArgumentToDataProviderRector.php | 3 +++ .../src/Rector/Class_/ProphecyPHPDocRector.php | 3 +++ .../Foreach_/SimplifyForeachInstanceOfRector.php | 3 +++ .../MethodCall/AssertCompareToSpecificMethodRector.php | 3 +++ .../AssertComparisonToSpecificMethodRector.php | 3 +++ ...ssertEqualsParameterToSpecificMethodsTypeRector.php | 3 +++ .../src/Rector/MethodCall/AssertEqualsToSameRector.php | 3 +++ .../MethodCall/AssertFalseStrposToContainsRector.php | 3 +++ .../MethodCall/AssertInstanceOfComparisonRector.php | 3 +++ .../MethodCall/AssertIssetToSpecificMethodRector.php | 3 +++ .../src/Rector/MethodCall/AssertNotOperatorRector.php | 3 +++ .../Rector/MethodCall/AssertPropertyExistsRector.php | 3 +++ .../src/Rector/MethodCall/AssertRegExpRector.php | 3 +++ .../AssertResourceToClosedResourceRector.php | 3 +++ .../AssertSameBoolNullToSpecificMethodRector.php | 3 +++ .../AssertSameTrueFalseToAssertTrueFalseRector.php | 3 +++ ...sertTrueFalseInternalTypeToSpecificMethodRector.php | 3 +++ .../AssertTrueFalseToSpecificMethodRector.php | 3 +++ .../Rector/MethodCall/ExplicitPhpErrorApiRector.php | 3 +++ .../MethodCall/RemoveExpectAnyFromMockRector.php | 3 +++ .../Rector/MethodCall/SpecificAssertContainsRector.php | 3 +++ .../SpecificAssertContainsWithoutIdentityRector.php | 3 +++ .../MethodCall/SpecificAssertInternalTypeRector.php | 3 +++ .../Rector/MethodCall/UseSpecificWillMethodRector.php | 3 +++ .../Rector/MethodCall/UseSpecificWithMethodRector.php | 3 +++ .../src/Rector/StaticCall/GetMockRector.php | 3 +++ 88 files changed, 276 insertions(+), 24 deletions(-) diff --git a/rules/Arguments/Rector/MethodCall/RemoveMethodCallParamRector.php b/rules/Arguments/Rector/MethodCall/RemoveMethodCallParamRector.php index 632a06946d1..ee96c49dba9 100644 --- a/rules/Arguments/Rector/MethodCall/RemoveMethodCallParamRector.php +++ b/rules/Arguments/Rector/MethodCall/RemoveMethodCallParamRector.php @@ -56,6 +56,9 @@ CODE_SAMPLE public function refactor(Node $node) : ?Node { $hasChanged = \false; + if ($node->isFirstClassCallable()) { + return null; + } foreach ($this->removeMethodCallParams as $removeMethodCallParam) { if (!$this->isName($node->name, $removeMethodCallParam->getMethodName())) { continue; diff --git a/rules/CodeQuality/Rector/Catch_/ThrowWithPreviousExceptionRector.php b/rules/CodeQuality/Rector/Catch_/ThrowWithPreviousExceptionRector.php index 1de34dbf2fc..62e53a44a45 100644 --- a/rules/CodeQuality/Rector/Catch_/ThrowWithPreviousExceptionRector.php +++ b/rules/CodeQuality/Rector/Catch_/ThrowWithPreviousExceptionRector.php @@ -113,6 +113,9 @@ CODE_SAMPLE if ($exceptionArgumentPosition === null) { return null; } + if ($new->isFirstClassCallable()) { + return null; + } // exception is bundled if (isset($new->getArgs()[$exceptionArgumentPosition])) { return null; diff --git a/rules/CodeQuality/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php b/rules/CodeQuality/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php index ae7e00e172d..172e0b02417 100644 --- a/rules/CodeQuality/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php +++ b/rules/CodeQuality/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php @@ -114,6 +114,9 @@ CODE_SAMPLE if ($new->args === []) { return null; } + if ($new->isFirstClassCallable()) { + return null; + } $methodReflection = $this->reflectionResolver->resolveMethodReflectionFromNew($new); if (!$methodReflection instanceof MethodReflection) { return null; @@ -131,6 +134,9 @@ CODE_SAMPLE */ private function refactorMethodCall($methodCall, Scope $scope) { + if ($methodCall->isFirstClassCallable()) { + return null; + } $methodReflection = $this->reflectionResolver->resolveFunctionLikeReflectionFromCall($methodCall); if (!$methodReflection instanceof MethodReflection) { return null; diff --git a/rules/CodeQuality/Rector/FuncCall/BoolvalToTypeCastRector.php b/rules/CodeQuality/Rector/FuncCall/BoolvalToTypeCastRector.php index cdc4948ab82..452f90452c4 100644 --- a/rules/CodeQuality/Rector/FuncCall/BoolvalToTypeCastRector.php +++ b/rules/CodeQuality/Rector/FuncCall/BoolvalToTypeCastRector.php @@ -48,6 +48,9 @@ CODE_SAMPLE */ public function refactor(Node $node) : ?Node { + if ($node->isFirstClassCallable()) { + return null; + } if (!$this->isName($node, 'boolval')) { return null; } diff --git a/rules/CodeQuality/Rector/FuncCall/CallUserFuncWithArrowFunctionToInlineRector.php b/rules/CodeQuality/Rector/FuncCall/CallUserFuncWithArrowFunctionToInlineRector.php index b5f4c73acb5..e3bee3c5909 100644 --- a/rules/CodeQuality/Rector/FuncCall/CallUserFuncWithArrowFunctionToInlineRector.php +++ b/rules/CodeQuality/Rector/FuncCall/CallUserFuncWithArrowFunctionToInlineRector.php @@ -62,6 +62,9 @@ CODE_SAMPLE */ public function refactor(Node $node) : ?Node { + if ($node->isFirstClassCallable()) { + return null; + } if (!$this->isName($node, 'call_user_func')) { return null; } diff --git a/rules/CodeQuality/Rector/FuncCall/FloatvalToTypeCastRector.php b/rules/CodeQuality/Rector/FuncCall/FloatvalToTypeCastRector.php index eafd834e5bc..88d05cc5a8b 100644 --- a/rules/CodeQuality/Rector/FuncCall/FloatvalToTypeCastRector.php +++ b/rules/CodeQuality/Rector/FuncCall/FloatvalToTypeCastRector.php @@ -62,9 +62,9 @@ CODE_SAMPLE if (!\in_array($methodName, self::VAL_FUNCTION_NAMES, \true)) { return null; } - // if (! isset($node->getArgs[0])) { - // return null; - // } + if ($node->isFirstClassCallable()) { + return null; + } $firstArg = $node->getArgs()[0]; $double = new Double($firstArg->value); $double->setAttribute(AttributeKey::KIND, Double::KIND_FLOAT); diff --git a/rules/CodeQuality/Rector/FuncCall/IsAWithStringWithThirdArgumentRector.php b/rules/CodeQuality/Rector/FuncCall/IsAWithStringWithThirdArgumentRector.php index 93b7bd8f6ac..6f02b524f52 100644 --- a/rules/CodeQuality/Rector/FuncCall/IsAWithStringWithThirdArgumentRector.php +++ b/rules/CodeQuality/Rector/FuncCall/IsAWithStringWithThirdArgumentRector.php @@ -51,6 +51,9 @@ CODE_SAMPLE if (!$this->isName($node, 'is_a')) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } if (isset($node->getArgs()[2])) { return null; } diff --git a/rules/CodeQuality/Rector/FuncCall/RemoveSoleValueSprintfRector.php b/rules/CodeQuality/Rector/FuncCall/RemoveSoleValueSprintfRector.php index faae1519df3..6b57e732139 100644 --- a/rules/CodeQuality/Rector/FuncCall/RemoveSoleValueSprintfRector.php +++ b/rules/CodeQuality/Rector/FuncCall/RemoveSoleValueSprintfRector.php @@ -53,6 +53,9 @@ CODE_SAMPLE if (!$this->isName($node, 'sprintf')) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } if (\count($node->getArgs()) !== 2) { return null; } diff --git a/rules/CodeQuality/Rector/FuncCall/SimplifyFuncGetArgsCountRector.php b/rules/CodeQuality/Rector/FuncCall/SimplifyFuncGetArgsCountRector.php index 0b82b9b7d00..22b559554b9 100644 --- a/rules/CodeQuality/Rector/FuncCall/SimplifyFuncGetArgsCountRector.php +++ b/rules/CodeQuality/Rector/FuncCall/SimplifyFuncGetArgsCountRector.php @@ -32,6 +32,9 @@ final class SimplifyFuncGetArgsCountRector extends AbstractRector if (!$this->isName($node, 'count')) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } $firstArg = $node->getArgs()[0]; if (!$firstArg->value instanceof FuncCall) { return null; diff --git a/rules/CodeQuality/Rector/FuncCall/SimplifyInArrayValuesRector.php b/rules/CodeQuality/Rector/FuncCall/SimplifyInArrayValuesRector.php index 1c7109a3af1..4e1c230f2a9 100644 --- a/rules/CodeQuality/Rector/FuncCall/SimplifyInArrayValuesRector.php +++ b/rules/CodeQuality/Rector/FuncCall/SimplifyInArrayValuesRector.php @@ -33,6 +33,9 @@ final class SimplifyInArrayValuesRector extends AbstractRector if (!$this->isName($node, 'in_array')) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } if (!isset($node->args[1])) { return null; } diff --git a/rules/CodeQuality/Rector/FuncCall/SimplifyStrposLowerRector.php b/rules/CodeQuality/Rector/FuncCall/SimplifyStrposLowerRector.php index 3902a69c433..5b43733397b 100644 --- a/rules/CodeQuality/Rector/FuncCall/SimplifyStrposLowerRector.php +++ b/rules/CodeQuality/Rector/FuncCall/SimplifyStrposLowerRector.php @@ -33,6 +33,9 @@ final class SimplifyStrposLowerRector extends AbstractRector if (!$this->isName($node, 'strpos')) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } if (!isset($node->getArgs()[0])) { return null; } diff --git a/rules/CodeQuality/Rector/FuncCall/SingleInArrayToCompareRector.php b/rules/CodeQuality/Rector/FuncCall/SingleInArrayToCompareRector.php index 875e4baaa54..a81bf73b848 100644 --- a/rules/CodeQuality/Rector/FuncCall/SingleInArrayToCompareRector.php +++ b/rules/CodeQuality/Rector/FuncCall/SingleInArrayToCompareRector.php @@ -59,6 +59,9 @@ CODE_SAMPLE if (!$this->isName($node, 'in_array')) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } if (!isset($node->args[1])) { return null; } diff --git a/rules/CodeQuality/Rector/Identical/GetClassToInstanceOfRector.php b/rules/CodeQuality/Rector/Identical/GetClassToInstanceOfRector.php index 3fb3547085e..51bcba3ec8f 100644 --- a/rules/CodeQuality/Rector/Identical/GetClassToInstanceOfRector.php +++ b/rules/CodeQuality/Rector/Identical/GetClassToInstanceOfRector.php @@ -65,6 +65,9 @@ final class GetClassToInstanceOfRector extends AbstractRector $firstExpr = $twoNodeMatch->getFirstExpr(); /** @var FuncCall $secondExpr */ $secondExpr = $twoNodeMatch->getSecondExpr(); + if ($secondExpr->isFirstClassCallable()) { + return null; + } if (!isset($secondExpr->getArgs()[0])) { return null; } diff --git a/rules/CodeQuality/Rector/If_/ExplicitBoolCompareRector.php b/rules/CodeQuality/Rector/If_/ExplicitBoolCompareRector.php index 37fb0c081a6..7486a5548f3 100644 --- a/rules/CodeQuality/Rector/If_/ExplicitBoolCompareRector.php +++ b/rules/CodeQuality/Rector/If_/ExplicitBoolCompareRector.php @@ -142,6 +142,9 @@ CODE_SAMPLE */ private function resolveCount(bool $isNegated, FuncCall $funcCall) { + if ($funcCall->isFirstClassCallable()) { + return null; + } $countedType = $this->getType($funcCall->getArgs()[0]->value); if ($countedType->isArray()->yes()) { return null; diff --git a/rules/CodingStyle/Rector/Class_/AddArrayDefaultToArrayPropertyRector.php b/rules/CodingStyle/Rector/Class_/AddArrayDefaultToArrayPropertyRector.php index 71de26c257d..a7ad0464be2 100644 --- a/rules/CodingStyle/Rector/Class_/AddArrayDefaultToArrayPropertyRector.php +++ b/rules/CodingStyle/Rector/Class_/AddArrayDefaultToArrayPropertyRector.php @@ -165,6 +165,9 @@ CODE_SAMPLE if (!$node instanceof FuncCall) { return \false; } + if ($node->isFirstClassCallable()) { + return \false; + } if (!$this->isName($node, 'count')) { return \false; } diff --git a/rules/CodingStyle/Rector/FuncCall/CallUserFuncToMethodCallRector.php b/rules/CodingStyle/Rector/FuncCall/CallUserFuncToMethodCallRector.php index 145fffcf8d5..f1c1e916635 100644 --- a/rules/CodingStyle/Rector/FuncCall/CallUserFuncToMethodCallRector.php +++ b/rules/CodingStyle/Rector/FuncCall/CallUserFuncToMethodCallRector.php @@ -64,6 +64,9 @@ CODE_SAMPLE if (!$this->isName($node, 'call_user_func')) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } if (!isset($node->getArgs()[0])) { return null; } diff --git a/rules/CodingStyle/Rector/FuncCall/ConsistentImplodeRector.php b/rules/CodingStyle/Rector/FuncCall/ConsistentImplodeRector.php index 1243b089d22..4bcace0d6ee 100644 --- a/rules/CodingStyle/Rector/FuncCall/ConsistentImplodeRector.php +++ b/rules/CodingStyle/Rector/FuncCall/ConsistentImplodeRector.php @@ -66,6 +66,9 @@ CODE_SAMPLE if (!$this->isName($node, 'implode')) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } if (\count($node->getArgs()) === 1) { // complete default value '' $node->args[1] = $node->getArgs()[0]; diff --git a/rules/CodingStyle/Rector/FuncCall/CountArrayToEmptyArrayComparisonRector.php b/rules/CodingStyle/Rector/FuncCall/CountArrayToEmptyArrayComparisonRector.php index a0019600fd9..223ed548e45 100644 --- a/rules/CodingStyle/Rector/FuncCall/CountArrayToEmptyArrayComparisonRector.php +++ b/rules/CodingStyle/Rector/FuncCall/CountArrayToEmptyArrayComparisonRector.php @@ -153,6 +153,9 @@ CODE_SAMPLE if (!$this->isName($expr, 'count')) { return null; } + if ($expr->isFirstClassCallable()) { + return null; + } $firstArg = $expr->getArgs()[0]; return $firstArg->value; } diff --git a/rules/DeadCode/NodeManipulator/CountManipulator.php b/rules/DeadCode/NodeManipulator/CountManipulator.php index c08276c75a9..141489224b8 100644 --- a/rules/DeadCode/NodeManipulator/CountManipulator.php +++ b/rules/DeadCode/NodeManipulator/CountManipulator.php @@ -92,6 +92,9 @@ final class CountManipulator if (!$this->nodeNameResolver->isName($node, 'count')) { return \false; } + if ($node->isFirstClassCallable()) { + return \false; + } if (!isset($node->getArgs()[0])) { return \false; } diff --git a/rules/MysqlToMysqli/Rector/FuncCall/MysqlFuncCallToMysqliRector.php b/rules/MysqlToMysqli/Rector/FuncCall/MysqlFuncCallToMysqliRector.php index 452a5123c90..cdc80b0a6d2 100644 --- a/rules/MysqlToMysqli/Rector/FuncCall/MysqlFuncCallToMysqliRector.php +++ b/rules/MysqlToMysqli/Rector/FuncCall/MysqlFuncCallToMysqliRector.php @@ -72,6 +72,9 @@ CODE_SAMPLE } private function processMysqlCreateDb(FuncCall $funcCall) : ?FuncCall { + if ($funcCall->isFirstClassCallable()) { + return null; + } if (!isset($funcCall->getArgs()[0])) { return null; } @@ -84,6 +87,9 @@ CODE_SAMPLE } private function processMysqlDropDb(FuncCall $funcCall) : ?FuncCall { + if ($funcCall->isFirstClassCallable()) { + return null; + } if (!isset($funcCall->getArgs()[0])) { return null; } diff --git a/rules/MysqlToMysqli/Rector/FuncCall/MysqlPConnectToMysqliConnectRector.php b/rules/MysqlToMysqli/Rector/FuncCall/MysqlPConnectToMysqliConnectRector.php index b30ef4f5d58..a41919c142b 100644 --- a/rules/MysqlToMysqli/Rector/FuncCall/MysqlPConnectToMysqliConnectRector.php +++ b/rules/MysqlToMysqli/Rector/FuncCall/MysqlPConnectToMysqliConnectRector.php @@ -55,6 +55,9 @@ CODE_SAMPLE if (!$this->isName($node, 'mysql_pconnect')) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } if (!isset($node->getArgs()[0])) { return null; } diff --git a/rules/MysqlToMysqli/Rector/FuncCall/MysqlQueryMysqlErrorWithLinkRector.php b/rules/MysqlToMysqli/Rector/FuncCall/MysqlQueryMysqlErrorWithLinkRector.php index f6239e928d1..ee3e0fe82fe 100644 --- a/rules/MysqlToMysqli/Rector/FuncCall/MysqlQueryMysqlErrorWithLinkRector.php +++ b/rules/MysqlToMysqli/Rector/FuncCall/MysqlQueryMysqlErrorWithLinkRector.php @@ -76,6 +76,9 @@ CODE_SAMPLE */ public function refactor(Node $node) : ?Node { + if ($node->isFirstClassCallable()) { + return null; + } foreach (self::FUNCTION_RENAME_MAP as $oldFunction => $newFunction) { if (!$this->isName($node, $oldFunction)) { continue; diff --git a/rules/Naming/Naming/VariableNaming.php b/rules/Naming/Naming/VariableNaming.php index 21d6fd4594d..2fa6b34d1bd 100644 --- a/rules/Naming/Naming/VariableNaming.php +++ b/rules/Naming/Naming/VariableNaming.php @@ -163,6 +163,9 @@ final class VariableNaming } private function resolveBareFuncCallArgumentName(FuncCall $funcCall, string $fallbackName, string $suffix) : string { + if ($funcCall->isFirstClassCallable()) { + return ''; + } if (!isset($funcCall->getArgs()[0])) { return ''; } diff --git a/rules/Php53/Rector/FuncCall/DirNameFileConstantToDirConstantRector.php b/rules/Php53/Rector/FuncCall/DirNameFileConstantToDirConstantRector.php index 563f900aa3a..d64f720a0cf 100644 --- a/rules/Php53/Rector/FuncCall/DirNameFileConstantToDirConstantRector.php +++ b/rules/Php53/Rector/FuncCall/DirNameFileConstantToDirConstantRector.php @@ -54,6 +54,9 @@ CODE_SAMPLE if (!$this->isName($node, 'dirname')) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } if (\count($node->args) !== 1) { return null; } diff --git a/rules/Php70/Rector/FuncCall/EregToPregMatchRector.php b/rules/Php70/Rector/FuncCall/EregToPregMatchRector.php index 69be18ddcc4..498e309b109 100644 --- a/rules/Php70/Rector/FuncCall/EregToPregMatchRector.php +++ b/rules/Php70/Rector/FuncCall/EregToPregMatchRector.php @@ -81,6 +81,9 @@ final class EregToPregMatchRector extends AbstractRector implements MinPhpVersio if (!isset(self::OLD_NAMES_TO_NEW_ONES[$functionName])) { return \true; } + if ($funcCall->isFirstClassCallable()) { + return \true; + } return !isset($funcCall->getArgs()[0]); } private function processStringPattern(FuncCall $funcCall, String_ $string, string $functionName) : void diff --git a/rules/Php70/Rector/FuncCall/MultiDirnameRector.php b/rules/Php70/Rector/FuncCall/MultiDirnameRector.php index 3521eedfb33..72bd6ef5b78 100644 --- a/rules/Php70/Rector/FuncCall/MultiDirnameRector.php +++ b/rules/Php70/Rector/FuncCall/MultiDirnameRector.php @@ -71,6 +71,9 @@ final class MultiDirnameRector extends AbstractRector implements MinPhpVersionIn if (!$this->isName($funcCall, self::DIRNAME)) { return null; } + if ($funcCall->isFirstClassCallable()) { + return null; + } $args = $funcCall->getArgs(); if (\count($args) >= 3) { return null; diff --git a/rules/Php71/IsArrayAndDualCheckToAble.php b/rules/Php71/IsArrayAndDualCheckToAble.php index b169370f370..e52ffbb15ea 100644 --- a/rules/Php71/IsArrayAndDualCheckToAble.php +++ b/rules/Php71/IsArrayAndDualCheckToAble.php @@ -56,6 +56,9 @@ final class IsArrayAndDualCheckToAble if (!$this->nodeNameResolver->isName($funcCallExpr, 'is_array')) { return null; } + if ($funcCallExpr->isFirstClassCallable()) { + return null; + } if (!isset($funcCallExpr->getArgs()[0])) { return null; } diff --git a/rules/Php71/Rector/FuncCall/CountOnNullRector.php b/rules/Php71/Rector/FuncCall/CountOnNullRector.php index 7e3d7bb7b0a..0e15e342a5f 100644 --- a/rules/Php71/Rector/FuncCall/CountOnNullRector.php +++ b/rules/Php71/Rector/FuncCall/CountOnNullRector.php @@ -149,6 +149,9 @@ CODE_SAMPLE if (!$this->isName($funcCall, 'count')) { return \true; } + if ($funcCall->isFirstClassCallable()) { + return \true; + } // skip ternary in trait, as impossible to analyse $trait = $this->betterNodeFinder->findParentType($funcCall, Trait_::class); if ($trait instanceof Trait_) { diff --git a/rules/Php72/Rector/Assign/ReplaceEachAssignmentWithKeyCurrentRector.php b/rules/Php72/Rector/Assign/ReplaceEachAssignmentWithKeyCurrentRector.php index 51e0cacbfcb..f70cd425d37 100644 --- a/rules/Php72/Rector/Assign/ReplaceEachAssignmentWithKeyCurrentRector.php +++ b/rules/Php72/Rector/Assign/ReplaceEachAssignmentWithKeyCurrentRector.php @@ -72,6 +72,9 @@ CODE_SAMPLE } /** @var FuncCall $eachFuncCall */ $eachFuncCall = $assign->expr; + if ($eachFuncCall->isFirstClassCallable()) { + return null; + } if (!isset($eachFuncCall->getArgs()[0])) { return null; } diff --git a/rules/Php72/Rector/FuncCall/GetClassOnNullRector.php b/rules/Php72/Rector/FuncCall/GetClassOnNullRector.php index edf724e0f0d..c5629d1e0c9 100644 --- a/rules/Php72/Rector/FuncCall/GetClassOnNullRector.php +++ b/rules/Php72/Rector/FuncCall/GetClassOnNullRector.php @@ -80,6 +80,9 @@ CODE_SAMPLE if (!$this->isName($node, 'get_class')) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } $firstArg = $node->getArgs()[0] ?? null; if (!$firstArg instanceof Arg) { return null; diff --git a/rules/Php72/Rector/FuncCall/StringifyDefineRector.php b/rules/Php72/Rector/FuncCall/StringifyDefineRector.php index 3ae057cd5a7..91cb088f325 100644 --- a/rules/Php72/Rector/FuncCall/StringifyDefineRector.php +++ b/rules/Php72/Rector/FuncCall/StringifyDefineRector.php @@ -71,6 +71,9 @@ CODE_SAMPLE if (!$this->isName($node, 'define')) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } if (!isset($node->getArgs()[0])) { return null; } diff --git a/rules/Php72/Rector/FuncCall/StringsAssertNakedRector.php b/rules/Php72/Rector/FuncCall/StringsAssertNakedRector.php index d7048a02c23..7ceb4e59913 100644 --- a/rules/Php72/Rector/FuncCall/StringsAssertNakedRector.php +++ b/rules/Php72/Rector/FuncCall/StringsAssertNakedRector.php @@ -67,6 +67,9 @@ CODE_SAMPLE if (!$this->isName($node, 'assert')) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } $firstArg = $node->getArgs()[0]; $firstArgValue = $firstArg->value; if (!$firstArgValue instanceof String_) { diff --git a/rules/Php72/Rector/While_/WhileEachToForeachRector.php b/rules/Php72/Rector/While_/WhileEachToForeachRector.php index 32a4682e873..d12f4cb8d83 100644 --- a/rules/Php72/Rector/While_/WhileEachToForeachRector.php +++ b/rules/Php72/Rector/While_/WhileEachToForeachRector.php @@ -82,6 +82,9 @@ CODE_SAMPLE } /** @var FuncCall $eachFuncCall */ $eachFuncCall = $assignNode->expr; + if ($eachFuncCall->isFirstClassCallable()) { + return null; + } /** @var List_ $listNode */ $listNode = $assignNode->var; if (!isset($eachFuncCall->getArgs()[0])) { diff --git a/rules/Php73/Rector/FuncCall/ArrayKeyFirstLastRector.php b/rules/Php73/Rector/FuncCall/ArrayKeyFirstLastRector.php index a79c55508df..7c40bc4f5c0 100644 --- a/rules/Php73/Rector/FuncCall/ArrayKeyFirstLastRector.php +++ b/rules/Php73/Rector/FuncCall/ArrayKeyFirstLastRector.php @@ -126,6 +126,9 @@ CODE_SAMPLE } private function resolveKeyFuncCall(Stmt $nextStmt, FuncCall $resetOrEndFuncCall) : ?FuncCall { + if ($resetOrEndFuncCall->isFirstClassCallable()) { + return null; + } /** @var FuncCall|null */ return $this->betterNodeFinder->findFirst($nextStmt, function (Node $subNode) use($resetOrEndFuncCall) : bool { if (!$subNode instanceof FuncCall) { @@ -134,6 +137,9 @@ CODE_SAMPLE if (!$this->isName($subNode, 'key')) { return \false; } + if ($subNode->isFirstClassCallable()) { + return \false; + } return $this->nodeComparator->areNodesEqual($resetOrEndFuncCall->getArgs()[0], $subNode->getArgs()[0]); }); } diff --git a/rules/Php73/Rector/FuncCall/JsonThrowOnErrorRector.php b/rules/Php73/Rector/FuncCall/JsonThrowOnErrorRector.php index 86ea0f080f7..cbce3e873c9 100644 --- a/rules/Php73/Rector/FuncCall/JsonThrowOnErrorRector.php +++ b/rules/Php73/Rector/FuncCall/JsonThrowOnErrorRector.php @@ -66,6 +66,9 @@ CODE_SAMPLE if (!$this->isNames($funcCall, ['json_encode', 'json_decode'])) { return \true; } + if ($funcCall->isFirstClassCallable()) { + return \true; + } if ($funcCall->args === null) { return \true; } diff --git a/rules/Php73/Rector/FuncCall/SetCookieRector.php b/rules/Php73/Rector/FuncCall/SetCookieRector.php index 9c24eca790e..c13c708ff4a 100644 --- a/rules/Php73/Rector/FuncCall/SetCookieRector.php +++ b/rules/Php73/Rector/FuncCall/SetCookieRector.php @@ -72,6 +72,9 @@ CODE_SAMPLE if (!$this->isNames($funcCall, ['setcookie', 'setrawcookie'])) { return \true; } + if ($funcCall->isFirstClassCallable()) { + return \true; + } $argsCount = \count($funcCall->args); if ($argsCount <= 2) { return \true; diff --git a/rules/Php74/Rector/FuncCall/ArraySpreadInsteadOfArrayMergeRector.php b/rules/Php74/Rector/FuncCall/ArraySpreadInsteadOfArrayMergeRector.php index fb39f5c13bb..3e14188614a 100644 --- a/rules/Php74/Rector/FuncCall/ArraySpreadInsteadOfArrayMergeRector.php +++ b/rules/Php74/Rector/FuncCall/ArraySpreadInsteadOfArrayMergeRector.php @@ -176,6 +176,9 @@ CODE_SAMPLE if (!$this->nodeNameResolver->isName($expr, 'iterator_to_array')) { return \false; } + if ($expr->isFirstClassCallable()) { + return \false; + } return isset($expr->getArgs()[0]); } } diff --git a/rules/Php74/Rector/FuncCall/MoneyFormatToNumberFormatRector.php b/rules/Php74/Rector/FuncCall/MoneyFormatToNumberFormatRector.php index d0747f7f06e..6df09ccc5b5 100644 --- a/rules/Php74/Rector/FuncCall/MoneyFormatToNumberFormatRector.php +++ b/rules/Php74/Rector/FuncCall/MoneyFormatToNumberFormatRector.php @@ -81,6 +81,9 @@ CODE_SAMPLE if (!$this->isName($funcCall, 'money_format')) { return null; } + if ($funcCall->isFirstClassCallable()) { + return null; + } $args = $funcCall->getArgs(); if ($this->argsAnalyzer->hasNamedArg($args)) { return null; diff --git a/rules/Php74/Rector/StaticCall/ExportToReflectionFunctionRector.php b/rules/Php74/Rector/StaticCall/ExportToReflectionFunctionRector.php index c9d924ff302..640f88b6089 100644 --- a/rules/Php74/Rector/StaticCall/ExportToReflectionFunctionRector.php +++ b/rules/Php74/Rector/StaticCall/ExportToReflectionFunctionRector.php @@ -60,6 +60,9 @@ CODE_SAMPLE if (!$this->isName($node->name, 'export')) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } $firstArg = $node->getArgs()[0] ?? null; if (!$firstArg instanceof Arg) { return null; diff --git a/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/SubstrMatchAndRefactor.php b/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/SubstrMatchAndRefactor.php index 8760ce82d06..140e15bb9f3 100644 --- a/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/SubstrMatchAndRefactor.php +++ b/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/SubstrMatchAndRefactor.php @@ -79,6 +79,9 @@ final class SubstrMatchAndRefactor implements StrStartWithMatchAndRefactorInterf private function isStrlenWithNeedleExpr(StrStartsWith $strStartsWith) : bool { $substrFuncCall = $strStartsWith->getFuncCall(); + if ($substrFuncCall->isFirstClassCallable()) { + return \false; + } $firstArg = $substrFuncCall->getArgs()[1]; if (!$this->valueResolver->isValue($firstArg->value, 0)) { return \false; @@ -98,6 +101,9 @@ final class SubstrMatchAndRefactor implements StrStartWithMatchAndRefactorInterf private function isHardcodedStringWithLNumberLength(StrStartsWith $strStartsWith) : bool { $substrFuncCall = $strStartsWith->getFuncCall(); + if ($substrFuncCall->isFirstClassCallable()) { + return \false; + } $secondArg = $substrFuncCall->getArgs()[1]; if (!$this->valueResolver->isValue($secondArg->value, 0)) { return \false; @@ -106,9 +112,6 @@ final class SubstrMatchAndRefactor implements StrStartWithMatchAndRefactorInterf if (!$hardcodedStringNeedle instanceof String_) { return \false; } - if ($substrFuncCall->isFirstClassCallable()) { - return \false; - } if (\count($substrFuncCall->getArgs()) < 3) { return \false; } diff --git a/rules/Php80/NodeManipulator/ResourceReturnToObject.php b/rules/Php80/NodeManipulator/ResourceReturnToObject.php index c82ce280ba1..eca85c6cff9 100644 --- a/rules/Php80/NodeManipulator/ResourceReturnToObject.php +++ b/rules/Php80/NodeManipulator/ResourceReturnToObject.php @@ -195,6 +195,9 @@ final class ResourceReturnToObject if (!$this->nodeNameResolver->isName($funcCall, 'is_resource')) { return \true; } + if ($funcCall->isFirstClassCallable()) { + return \true; + } if (!isset($funcCall->getArgs()[0])) { return \true; } diff --git a/rules/Php80/Rector/FuncCall/ClassOnObjectRector.php b/rules/Php80/Rector/FuncCall/ClassOnObjectRector.php index 1b2d6af3176..1a4de0138fa 100644 --- a/rules/Php80/Rector/FuncCall/ClassOnObjectRector.php +++ b/rules/Php80/Rector/FuncCall/ClassOnObjectRector.php @@ -56,6 +56,9 @@ CODE_SAMPLE if (!$this->nodeNameResolver->isName($node, 'get_class')) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } if (!isset($node->getArgs()[0])) { return new ClassConstFetch(new Name('self'), 'class'); } diff --git a/rules/Php80/Rector/NotIdentical/StrContainsRector.php b/rules/Php80/Rector/NotIdentical/StrContainsRector.php index fc3eadeac52..963570870bf 100644 --- a/rules/Php80/Rector/NotIdentical/StrContainsRector.php +++ b/rules/Php80/Rector/NotIdentical/StrContainsRector.php @@ -72,6 +72,9 @@ CODE_SAMPLE if (!$funcCall instanceof FuncCall) { return null; } + if ($funcCall->isFirstClassCallable()) { + return null; + } if (isset($funcCall->getArgs()[2])) { $secondArg = $funcCall->getArgs()[2]; if ($this->isName($funcCall->name, 'strpos') && $this->isPositiveInteger($secondArg->value)) { diff --git a/rules/Php80/Rector/Ternary/GetDebugTypeRector.php b/rules/Php80/Rector/Ternary/GetDebugTypeRector.php index 5142de5a437..0a082a1de1f 100644 --- a/rules/Php80/Rector/Ternary/GetDebugTypeRector.php +++ b/rules/Php80/Rector/Ternary/GetDebugTypeRector.php @@ -112,6 +112,9 @@ CODE_SAMPLE { /** @var FuncCall $isObjectFuncCall */ $isObjectFuncCall = $ternary->cond; + if ($isObjectFuncCall->isFirstClassCallable()) { + return \false; + } $firstExpr = $isObjectFuncCall->getArgs()[0]->value; /** @var FuncCall|ClassConstFetch $getClassFuncCallOrClassConstFetchClass */ $getClassFuncCallOrClassConstFetchClass = $ternary->if; diff --git a/rules/Php80/ValueObjectFactory/StrStartsWithFactory.php b/rules/Php80/ValueObjectFactory/StrStartsWithFactory.php index 7d37c631434..83b01903a4e 100644 --- a/rules/Php80/ValueObjectFactory/StrStartsWithFactory.php +++ b/rules/Php80/ValueObjectFactory/StrStartsWithFactory.php @@ -9,6 +9,9 @@ final class StrStartsWithFactory { public function createFromFuncCall(FuncCall $funcCall, bool $isPositive) : ?StrStartsWith { + if ($funcCall->isFirstClassCallable()) { + return null; + } if (\count($funcCall->getArgs()) < 2) { return null; } diff --git a/rules/Php81/NodeAnalyzer/ComplexNewAnalyzer.php b/rules/Php81/NodeAnalyzer/ComplexNewAnalyzer.php index e2df97fef56..08248004c91 100644 --- a/rules/Php81/NodeAnalyzer/ComplexNewAnalyzer.php +++ b/rules/Php81/NodeAnalyzer/ComplexNewAnalyzer.php @@ -32,6 +32,9 @@ final class ComplexNewAnalyzer if (!$new->class instanceof FullyQualified) { return \true; } + if ($new->isFirstClassCallable()) { + return \false; + } $args = $new->getArgs(); foreach ($args as $arg) { $value = $arg->value; diff --git a/rules/Transform/Rector/MethodCall/MethodCallToFuncCallRector.php b/rules/Transform/Rector/MethodCall/MethodCallToFuncCallRector.php index b448ae895e2..60848b73479 100644 --- a/rules/Transform/Rector/MethodCall/MethodCallToFuncCallRector.php +++ b/rules/Transform/Rector/MethodCall/MethodCallToFuncCallRector.php @@ -57,6 +57,9 @@ CODE_SAMPLE */ public function refactor(Node $node) : ?Node { + if ($node->isFirstClassCallable()) { + return null; + } foreach ($this->methodCallsToFuncCalls as $methodCallToFuncCall) { if (!$this->isName($node->name, $methodCallToFuncCall->getMethodName())) { continue; diff --git a/rules/Transform/Rector/New_/NewArgToMethodCallRector.php b/rules/Transform/Rector/New_/NewArgToMethodCallRector.php index e29572defc3..606a523e06a 100644 --- a/rules/Transform/Rector/New_/NewArgToMethodCallRector.php +++ b/rules/Transform/Rector/New_/NewArgToMethodCallRector.php @@ -59,6 +59,9 @@ CODE_SAMPLE */ public function refactor(Node $node) : ?Node { + if ($node->isFirstClassCallable()) { + return null; + } foreach ($this->newArgsToMethodCalls as $newArgToMethodCall) { if (!$this->isObjectType($node->class, $newArgToMethodCall->getObjectType())) { continue; diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index bc09ccc55b9..3d263c80ec8 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = '5d6cff121b884ce17d6cf117e60b74dd67af75f2'; + public const PACKAGE_VERSION = '88eed987cc361166359c158ffd22d264d165aa8b'; /** * @api * @var string */ - public const RELEASE_DATE = '2023-06-02 10:17:43'; + public const RELEASE_DATE = '2023-06-02 12:28:24'; /** * @var int */ diff --git a/vendor/autoload.php b/vendor/autoload.php index eaf4a665ce3..f6d258d576a 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) { require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit0a5ba555dd7333dbe09222d22f70764f::getLoader(); +return ComposerAutoloaderInit713a1ea64ac54d399d5089341c28caa7::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 6402bca6c21..520df5a2416 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit0a5ba555dd7333dbe09222d22f70764f +class ComposerAutoloaderInit713a1ea64ac54d399d5089341c28caa7 { private static $loader; @@ -22,17 +22,17 @@ class ComposerAutoloaderInit0a5ba555dd7333dbe09222d22f70764f return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit0a5ba555dd7333dbe09222d22f70764f', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit713a1ea64ac54d399d5089341c28caa7', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit0a5ba555dd7333dbe09222d22f70764f', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit713a1ea64ac54d399d5089341c28caa7', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit0a5ba555dd7333dbe09222d22f70764f::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit713a1ea64ac54d399d5089341c28caa7::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInit0a5ba555dd7333dbe09222d22f70764f::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInit713a1ea64ac54d399d5089341c28caa7::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index c51f02d4b1f..16ea40d0870 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit0a5ba555dd7333dbe09222d22f70764f +class ComposerStaticInit713a1ea64ac54d399d5089341c28caa7 { public static $files = array ( 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', @@ -3068,9 +3068,9 @@ class ComposerStaticInit0a5ba555dd7333dbe09222d22f70764f public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit0a5ba555dd7333dbe09222d22f70764f::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit0a5ba555dd7333dbe09222d22f70764f::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit0a5ba555dd7333dbe09222d22f70764f::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit713a1ea64ac54d399d5089341c28caa7::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit713a1ea64ac54d399d5089341c28caa7::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit713a1ea64ac54d399d5089341c28caa7::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 51d4ad2936b..ded20042fc9 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1988,12 +1988,12 @@ "source": { "type": "git", "url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git", - "reference": "b980109c94df9fac555f52b848161053cf104243" + "reference": "71fabfb51087ff0e6c97ad0296e20ff3634b9008" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/b980109c94df9fac555f52b848161053cf104243", - "reference": "b980109c94df9fac555f52b848161053cf104243", + "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/71fabfb51087ff0e6c97ad0296e20ff3634b9008", + "reference": "71fabfb51087ff0e6c97ad0296e20ff3634b9008", "shasum": "" }, "require": { @@ -2022,7 +2022,7 @@ "tomasvotruba\/type-coverage": "^0.1", "tomasvotruba\/unused-public": "^0.1" }, - "time": "2023-06-01T22:34:28+00:00", + "time": "2023-06-02T12:25:23+00:00", "default-branch": true, "type": "rector-extension", "extra": { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 0525e65ce00..24f1c0e6af6 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -2,4 +2,4 @@ namespace RectorPrefix202306; -return array('root' => array('name' => 'rector/rector-src', 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => NULL, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(0 => '0.15.x-dev'), 'dev' => \false), 'versions' => array('clue/ndjson-react' => array('pretty_version' => 'v1.3.0', 'version' => '1.3.0.0', 'reference' => '392dc165fce93b5bb5c637b67e59619223c931b0', 'type' => 'library', 'install_path' => __DIR__ . '/../clue/ndjson-react', 'aliases' => array(), 'dev_requirement' => \false), 'composer/pcre' => array('pretty_version' => '3.1.0', 'version' => '3.1.0.0', 'reference' => '4bff79ddd77851fe3cdd11616ed3f92841ba5bd2', 'type' => 'library', 'install_path' => __DIR__ . '/./pcre', 'aliases' => array(), 'dev_requirement' => \false), 'composer/semver' => array('pretty_version' => '3.3.2', 'version' => '3.3.2.0', 'reference' => '3953f23262f2bff1919fc82183ad9acb13ff62c9', 'type' => 'library', 'install_path' => __DIR__ . '/./semver', 'aliases' => array(), 'dev_requirement' => \false), 'composer/xdebug-handler' => array('pretty_version' => '3.0.3', 'version' => '3.0.3.0', 'reference' => 'ced299686f41dce890debac69273b47ffe98a40c', 'type' => 'library', 'install_path' => __DIR__ . '/./xdebug-handler', 'aliases' => array(), 'dev_requirement' => \false), 'doctrine/inflector' => array('pretty_version' => '2.0.6', 'version' => '2.0.6.0', 'reference' => 'd9d313a36c872fd6ee06d9a6cbcf713eaa40f024', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/inflector', 'aliases' => array(), 'dev_requirement' => \false), 'evenement/evenement' => array('pretty_version' => 'v3.0.1', 'version' => '3.0.1.0', 'reference' => '531bfb9d15f8aa57454f5f0285b18bec903b8fb7', 'type' => 'library', 'install_path' => __DIR__ . '/../evenement/evenement', 'aliases' => array(), 'dev_requirement' => \false), 'fidry/cpu-core-counter' => array('pretty_version' => '0.5.1', 'version' => '0.5.1.0', 'reference' => 'b58e5a3933e541dc286cc91fc4f3898bbc6f1623', 'type' => 'library', 'install_path' => __DIR__ . '/../fidry/cpu-core-counter', 'aliases' => array(), 'dev_requirement' => \false), 'nette/neon' => array('pretty_version' => 'v3.4.0', 'version' => '3.4.0.0', 'reference' => '372d945c156ee7f35c953339fb164538339e6283', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/neon', 'aliases' => array(), 'dev_requirement' => \false), 'nette/utils' => array('pretty_version' => 'v3.2.9', 'version' => '3.2.9.0', 'reference' => 'c91bac3470c34b2ecd5400f6e6fdf0b64a836a5c', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.15.5', 'version' => '4.15.5.0', 'reference' => '11e2663a5bc9db5d714eedb4277ee300403b4a9e', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), 'dev_requirement' => \false), 'ondram/ci-detector' => array('pretty_version' => '4.1.0', 'version' => '4.1.0.0', 'reference' => '8a4b664e916df82ff26a44709942dfd593fa6f30', 'type' => 'library', 'install_path' => __DIR__ . '/../ondram/ci-detector', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpdoc-parser' => array('pretty_version' => '1.22.0', 'version' => '1.22.0.0', 'reference' => 'ec58baf7b3c7f1c81b3b00617c953249fb8cf30c', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan' => array('pretty_version' => '1.10.15', 'version' => '1.10.15.0', 'reference' => '762c4dac4da6f8756eebb80e528c3a47855da9bd', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), 'dev_requirement' => \false), 'psr/cache' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'aa5030cfa5405eccfdcb1083ce040c2cb8d253bf', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/cache', 'aliases' => array(), 'dev_requirement' => \false), 'psr/container' => array('pretty_version' => '2.0.2', 'version' => '2.0.2.0', 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'dev_requirement' => \false), 'psr/container-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0')), 'psr/event-dispatcher' => array('pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'reference' => 'dbefd12671e8a14ec7f180cab83036ed26714bb0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/event-dispatcher', 'aliases' => array(), 'dev_requirement' => \false), 'psr/log' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'fe5ea303b0887d5caefd3d431c3e61ad47037001', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => \false), 'psr/log-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0|2.0|3.0')), 'react/cache' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => 'd47c472b64aa5608225f47965a484b75c7817d5b', 'type' => 'library', 'install_path' => __DIR__ . '/../react/cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/child-process' => array('pretty_version' => 'v0.6.5', 'version' => '0.6.5.0', 'reference' => 'e71eb1aa55f057c7a4a0d08d06b0b0a484bead43', 'type' => 'library', 'install_path' => __DIR__ . '/../react/child-process', 'aliases' => array(), 'dev_requirement' => \false), 'react/dns' => array('pretty_version' => 'v1.10.0', 'version' => '1.10.0.0', 'reference' => 'a5427e7dfa47713e438016905605819d101f238c', 'type' => 'library', 'install_path' => __DIR__ . '/../react/dns', 'aliases' => array(), 'dev_requirement' => \false), 'react/event-loop' => array('pretty_version' => 'v1.4.0', 'version' => '1.4.0.0', 'reference' => '6e7e587714fff7a83dcc7025aee42ab3b265ae05', 'type' => 'library', 'install_path' => __DIR__ . '/../react/event-loop', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise' => array('pretty_version' => 'v2.10.0', 'version' => '2.10.0.0', 'reference' => 'f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise-timer' => array('pretty_version' => 'v1.9.0', 'version' => '1.9.0.0', 'reference' => 'aa7a73c74b8d8c0f622f5982ff7b0351bc29e495', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise-timer', 'aliases' => array(), 'dev_requirement' => \false), 'react/socket' => array('pretty_version' => 'v1.12.0', 'version' => '1.12.0.0', 'reference' => '81e1b4d7f5450ebd8d2e9a95bb008bb15ca95a7b', 'type' => 'library', 'install_path' => __DIR__ . '/../react/socket', 'aliases' => array(), 'dev_requirement' => \false), 'react/stream' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => '7a423506ee1903e89f1e08ec5f0ed430ff784ae9', 'type' => 'library', 'install_path' => __DIR__ . '/../react/stream', 'aliases' => array(), 'dev_requirement' => \false), 'rector/extension-installer' => array('pretty_version' => '0.11.2', 'version' => '0.11.2.0', 'reference' => '05544e9b195863b8571ae2a3b903cbec7fa062e0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../rector/extension-installer', 'aliases' => array(), 'dev_requirement' => \false), 'rector/rector' => array('dev_requirement' => \false, 'replaced' => array(0 => '0.15.x-dev', 1 => 'dev-main')), 'rector/rector-doctrine' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'e79ad0529fe431d018df95195874544e2828b7f1', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-doctrine', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'rector/rector-downgrade-php' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '7e64cfd91c3656c88780fe5f32d5a9903ea763bb', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-downgrade-php', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'rector/rector-phpunit' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'b980109c94df9fac555f52b848161053cf104243', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpunit', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-src' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => NULL, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(0 => '0.15.x-dev'), 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '5c0d61c8c0563057f01cf88998465e480d536747', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'sebastian/diff' => array('pretty_version' => '5.0.3', 'version' => '5.0.3.0', 'reference' => '912dc2fbe3e3c1e7873313cc801b100b6c68c87b', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/cache-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.3.0')), 'symfony/config' => array('pretty_version' => 'v6.3.0', 'version' => '6.3.0.0', 'reference' => 'a5e00dec161b08c946a2c16eed02adbeedf827ae', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v6.3.0', 'version' => '6.3.0.0', 'reference' => '8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/contracts' => array('pretty_version' => 'v3.3.0', 'version' => '3.3.0.0', 'reference' => '9e4b5e4e44e7620475dbceecf7c72c3883f3ea35', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/dependency-injection' => array('pretty_version' => 'v6.1.12', 'version' => '6.1.12.0', 'reference' => '360c9d0948e1fe675336346d5862e8e55b378d90', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.3.0')), 'symfony/event-dispatcher-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.3.0')), 'symfony/filesystem' => array('pretty_version' => 'v6.3.0', 'version' => '6.3.0.0', 'reference' => '97b698e1d77d356304def77a8d0cd73090b359ea', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.3.0', 'version' => '6.3.0.0', 'reference' => 'd9b01ba073c44cef617c7907ce2419f8d00d75e2', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/http-client-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.3.0')), 'symfony/polyfill-ctype' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-intl-grapheme' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-intl-normalizer' => array('pretty_version' => 'v1.27.0', 'version' => '1.27.0.0', 'reference' => '19bd1e4fcd5b91116f14d8533c57831ed00571b6', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.27.0', 'version' => '1.27.0.0', 'reference' => '8ad114f6b39e2c98a8b0e3bd907732c207c2b534', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/process' => array('pretty_version' => 'v6.3.0', 'version' => '6.3.0.0', 'reference' => '8741e3ed7fe2e91ec099e02446fb86667a0f1628', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.3.0')), 'symfony/service-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0|3.0')), 'symfony/string' => array('pretty_version' => 'v6.3.0', 'version' => '6.3.0.0', 'reference' => 'f2e190ee75ff0f5eced645ec0be5c66fac81f51f', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.3.0')), 'symplify/easy-parallel' => array('pretty_version' => '11.1.27', 'version' => '11.1.27.0', 'reference' => '28911142f6a0f4127271f745e2403bb84fcd2b87', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/easy-parallel', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '11.1.26', 'version' => '11.1.26.0', 'reference' => '3e66b3fec678b74a076395ec629d535fb95293b5', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'tracy/tracy' => array('pretty_version' => 'v2.10.2', 'version' => '2.10.2.0', 'reference' => '882fee7cf4258a602ad4a37461e837ed2ca1406b', 'type' => 'library', 'install_path' => __DIR__ . '/../tracy/tracy', 'aliases' => array(), 'dev_requirement' => \false), 'webmozart/assert' => array('pretty_version' => '1.11.0', 'version' => '1.11.0.0', 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991', 'type' => 'library', 'install_path' => __DIR__ . '/../webmozart/assert', 'aliases' => array(), 'dev_requirement' => \false))); +return array('root' => array('name' => 'rector/rector-src', 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => NULL, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(0 => '0.15.x-dev'), 'dev' => \false), 'versions' => array('clue/ndjson-react' => array('pretty_version' => 'v1.3.0', 'version' => '1.3.0.0', 'reference' => '392dc165fce93b5bb5c637b67e59619223c931b0', 'type' => 'library', 'install_path' => __DIR__ . '/../clue/ndjson-react', 'aliases' => array(), 'dev_requirement' => \false), 'composer/pcre' => array('pretty_version' => '3.1.0', 'version' => '3.1.0.0', 'reference' => '4bff79ddd77851fe3cdd11616ed3f92841ba5bd2', 'type' => 'library', 'install_path' => __DIR__ . '/./pcre', 'aliases' => array(), 'dev_requirement' => \false), 'composer/semver' => array('pretty_version' => '3.3.2', 'version' => '3.3.2.0', 'reference' => '3953f23262f2bff1919fc82183ad9acb13ff62c9', 'type' => 'library', 'install_path' => __DIR__ . '/./semver', 'aliases' => array(), 'dev_requirement' => \false), 'composer/xdebug-handler' => array('pretty_version' => '3.0.3', 'version' => '3.0.3.0', 'reference' => 'ced299686f41dce890debac69273b47ffe98a40c', 'type' => 'library', 'install_path' => __DIR__ . '/./xdebug-handler', 'aliases' => array(), 'dev_requirement' => \false), 'doctrine/inflector' => array('pretty_version' => '2.0.6', 'version' => '2.0.6.0', 'reference' => 'd9d313a36c872fd6ee06d9a6cbcf713eaa40f024', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/inflector', 'aliases' => array(), 'dev_requirement' => \false), 'evenement/evenement' => array('pretty_version' => 'v3.0.1', 'version' => '3.0.1.0', 'reference' => '531bfb9d15f8aa57454f5f0285b18bec903b8fb7', 'type' => 'library', 'install_path' => __DIR__ . '/../evenement/evenement', 'aliases' => array(), 'dev_requirement' => \false), 'fidry/cpu-core-counter' => array('pretty_version' => '0.5.1', 'version' => '0.5.1.0', 'reference' => 'b58e5a3933e541dc286cc91fc4f3898bbc6f1623', 'type' => 'library', 'install_path' => __DIR__ . '/../fidry/cpu-core-counter', 'aliases' => array(), 'dev_requirement' => \false), 'nette/neon' => array('pretty_version' => 'v3.4.0', 'version' => '3.4.0.0', 'reference' => '372d945c156ee7f35c953339fb164538339e6283', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/neon', 'aliases' => array(), 'dev_requirement' => \false), 'nette/utils' => array('pretty_version' => 'v3.2.9', 'version' => '3.2.9.0', 'reference' => 'c91bac3470c34b2ecd5400f6e6fdf0b64a836a5c', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.15.5', 'version' => '4.15.5.0', 'reference' => '11e2663a5bc9db5d714eedb4277ee300403b4a9e', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), 'dev_requirement' => \false), 'ondram/ci-detector' => array('pretty_version' => '4.1.0', 'version' => '4.1.0.0', 'reference' => '8a4b664e916df82ff26a44709942dfd593fa6f30', 'type' => 'library', 'install_path' => __DIR__ . '/../ondram/ci-detector', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpdoc-parser' => array('pretty_version' => '1.22.0', 'version' => '1.22.0.0', 'reference' => 'ec58baf7b3c7f1c81b3b00617c953249fb8cf30c', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan' => array('pretty_version' => '1.10.15', 'version' => '1.10.15.0', 'reference' => '762c4dac4da6f8756eebb80e528c3a47855da9bd', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), 'dev_requirement' => \false), 'psr/cache' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'aa5030cfa5405eccfdcb1083ce040c2cb8d253bf', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/cache', 'aliases' => array(), 'dev_requirement' => \false), 'psr/container' => array('pretty_version' => '2.0.2', 'version' => '2.0.2.0', 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'dev_requirement' => \false), 'psr/container-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0')), 'psr/event-dispatcher' => array('pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'reference' => 'dbefd12671e8a14ec7f180cab83036ed26714bb0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/event-dispatcher', 'aliases' => array(), 'dev_requirement' => \false), 'psr/log' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'fe5ea303b0887d5caefd3d431c3e61ad47037001', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => \false), 'psr/log-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0|2.0|3.0')), 'react/cache' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => 'd47c472b64aa5608225f47965a484b75c7817d5b', 'type' => 'library', 'install_path' => __DIR__ . '/../react/cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/child-process' => array('pretty_version' => 'v0.6.5', 'version' => '0.6.5.0', 'reference' => 'e71eb1aa55f057c7a4a0d08d06b0b0a484bead43', 'type' => 'library', 'install_path' => __DIR__ . '/../react/child-process', 'aliases' => array(), 'dev_requirement' => \false), 'react/dns' => array('pretty_version' => 'v1.10.0', 'version' => '1.10.0.0', 'reference' => 'a5427e7dfa47713e438016905605819d101f238c', 'type' => 'library', 'install_path' => __DIR__ . '/../react/dns', 'aliases' => array(), 'dev_requirement' => \false), 'react/event-loop' => array('pretty_version' => 'v1.4.0', 'version' => '1.4.0.0', 'reference' => '6e7e587714fff7a83dcc7025aee42ab3b265ae05', 'type' => 'library', 'install_path' => __DIR__ . '/../react/event-loop', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise' => array('pretty_version' => 'v2.10.0', 'version' => '2.10.0.0', 'reference' => 'f913fb8cceba1e6644b7b90c4bfb678ed8a3ef38', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise-timer' => array('pretty_version' => 'v1.9.0', 'version' => '1.9.0.0', 'reference' => 'aa7a73c74b8d8c0f622f5982ff7b0351bc29e495', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise-timer', 'aliases' => array(), 'dev_requirement' => \false), 'react/socket' => array('pretty_version' => 'v1.12.0', 'version' => '1.12.0.0', 'reference' => '81e1b4d7f5450ebd8d2e9a95bb008bb15ca95a7b', 'type' => 'library', 'install_path' => __DIR__ . '/../react/socket', 'aliases' => array(), 'dev_requirement' => \false), 'react/stream' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => '7a423506ee1903e89f1e08ec5f0ed430ff784ae9', 'type' => 'library', 'install_path' => __DIR__ . '/../react/stream', 'aliases' => array(), 'dev_requirement' => \false), 'rector/extension-installer' => array('pretty_version' => '0.11.2', 'version' => '0.11.2.0', 'reference' => '05544e9b195863b8571ae2a3b903cbec7fa062e0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../rector/extension-installer', 'aliases' => array(), 'dev_requirement' => \false), 'rector/rector' => array('dev_requirement' => \false, 'replaced' => array(0 => '0.15.x-dev', 1 => 'dev-main')), 'rector/rector-doctrine' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'e79ad0529fe431d018df95195874544e2828b7f1', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-doctrine', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'rector/rector-downgrade-php' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '7e64cfd91c3656c88780fe5f32d5a9903ea763bb', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-downgrade-php', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'rector/rector-phpunit' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '71fabfb51087ff0e6c97ad0296e20ff3634b9008', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpunit', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-src' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => NULL, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(0 => '0.15.x-dev'), 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '5c0d61c8c0563057f01cf88998465e480d536747', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'sebastian/diff' => array('pretty_version' => '5.0.3', 'version' => '5.0.3.0', 'reference' => '912dc2fbe3e3c1e7873313cc801b100b6c68c87b', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/cache-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.3.0')), 'symfony/config' => array('pretty_version' => 'v6.3.0', 'version' => '6.3.0.0', 'reference' => 'a5e00dec161b08c946a2c16eed02adbeedf827ae', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v6.3.0', 'version' => '6.3.0.0', 'reference' => '8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/contracts' => array('pretty_version' => 'v3.3.0', 'version' => '3.3.0.0', 'reference' => '9e4b5e4e44e7620475dbceecf7c72c3883f3ea35', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/dependency-injection' => array('pretty_version' => 'v6.1.12', 'version' => '6.1.12.0', 'reference' => '360c9d0948e1fe675336346d5862e8e55b378d90', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.3.0')), 'symfony/event-dispatcher-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.3.0')), 'symfony/filesystem' => array('pretty_version' => 'v6.3.0', 'version' => '6.3.0.0', 'reference' => '97b698e1d77d356304def77a8d0cd73090b359ea', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.3.0', 'version' => '6.3.0.0', 'reference' => 'd9b01ba073c44cef617c7907ce2419f8d00d75e2', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/http-client-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.3.0')), 'symfony/polyfill-ctype' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-intl-grapheme' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-intl-normalizer' => array('pretty_version' => 'v1.27.0', 'version' => '1.27.0.0', 'reference' => '19bd1e4fcd5b91116f14d8533c57831ed00571b6', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.27.0', 'version' => '1.27.0.0', 'reference' => '8ad114f6b39e2c98a8b0e3bd907732c207c2b534', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/process' => array('pretty_version' => 'v6.3.0', 'version' => '6.3.0.0', 'reference' => '8741e3ed7fe2e91ec099e02446fb86667a0f1628', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.3.0')), 'symfony/service-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0|3.0')), 'symfony/string' => array('pretty_version' => 'v6.3.0', 'version' => '6.3.0.0', 'reference' => 'f2e190ee75ff0f5eced645ec0be5c66fac81f51f', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.3.0')), 'symplify/easy-parallel' => array('pretty_version' => '11.1.27', 'version' => '11.1.27.0', 'reference' => '28911142f6a0f4127271f745e2403bb84fcd2b87', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/easy-parallel', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '11.1.26', 'version' => '11.1.26.0', 'reference' => '3e66b3fec678b74a076395ec629d535fb95293b5', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'tracy/tracy' => array('pretty_version' => 'v2.10.2', 'version' => '2.10.2.0', 'reference' => '882fee7cf4258a602ad4a37461e837ed2ca1406b', 'type' => 'library', 'install_path' => __DIR__ . '/../tracy/tracy', 'aliases' => array(), 'dev_requirement' => \false), 'webmozart/assert' => array('pretty_version' => '1.11.0', 'version' => '1.11.0.0', 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991', 'type' => 'library', 'install_path' => __DIR__ . '/../webmozart/assert', 'aliases' => array(), 'dev_requirement' => \false))); diff --git a/vendor/rector/extension-installer/src/GeneratedConfig.php b/vendor/rector/extension-installer/src/GeneratedConfig.php index adec90409dd..92aaa73df73 100644 --- a/vendor/rector/extension-installer/src/GeneratedConfig.php +++ b/vendor/rector/extension-installer/src/GeneratedConfig.php @@ -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 e79ad05'), '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 7e64cfd'), '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 b980109'), '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 5c0d61c')); + 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 e79ad05'), '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 7e64cfd'), '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 71fabfb'), '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 5c0d61c')); private function __construct() { } diff --git a/vendor/rector/rector-phpunit/src/NodeFactory/ArgumentShiftingFactory.php b/vendor/rector/rector-phpunit/src/NodeFactory/ArgumentShiftingFactory.php index 04bed1ccbba..2a5b39d1f62 100644 --- a/vendor/rector/rector-phpunit/src/NodeFactory/ArgumentShiftingFactory.php +++ b/vendor/rector/rector-phpunit/src/NodeFactory/ArgumentShiftingFactory.php @@ -9,6 +9,9 @@ final class ArgumentShiftingFactory { public function removeAllButFirstArgMethodCall(MethodCall $methodCall, string $methodName) : void { + if ($methodCall->isFirstClassCallable()) { + return; + } $methodCall->name = new Identifier($methodName); foreach (\array_keys($methodCall->getArgs()) as $i) { // keep first arg diff --git a/vendor/rector/rector-phpunit/src/NodeFactory/ExpectExceptionCodeFactory.php b/vendor/rector/rector-phpunit/src/NodeFactory/ExpectExceptionCodeFactory.php index b049379712c..4fcc7f57ffb 100644 --- a/vendor/rector/rector-phpunit/src/NodeFactory/ExpectExceptionCodeFactory.php +++ b/vendor/rector/rector-phpunit/src/NodeFactory/ExpectExceptionCodeFactory.php @@ -35,6 +35,9 @@ final class ExpectExceptionCodeFactory if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($methodCall, ['assertSame', 'assertEquals'])) { return null; } + if ($methodCall->isFirstClassCallable()) { + return null; + } $secondArgument = $methodCall->getArgs()[1]->value; if (!$secondArgument instanceof MethodCall) { return null; diff --git a/vendor/rector/rector-phpunit/src/NodeFactory/ExpectExceptionFactory.php b/vendor/rector/rector-phpunit/src/NodeFactory/ExpectExceptionFactory.php index 584cc0780cf..e5a9a4a73de 100644 --- a/vendor/rector/rector-phpunit/src/NodeFactory/ExpectExceptionFactory.php +++ b/vendor/rector/rector-phpunit/src/NodeFactory/ExpectExceptionFactory.php @@ -29,6 +29,9 @@ final class ExpectExceptionFactory if (!$this->testsNodeAnalyzer->isInPHPUnitMethodCallName($methodCall, 'assertInstanceOf')) { return null; } + if ($methodCall->isFirstClassCallable()) { + return null; + } $argumentVariableName = $this->nodeNameResolver->getName($methodCall->getArgs()[1]->value); if ($argumentVariableName === null) { return null; diff --git a/vendor/rector/rector-phpunit/src/NodeFactory/ExpectExceptionMessageFactory.php b/vendor/rector/rector-phpunit/src/NodeFactory/ExpectExceptionMessageFactory.php index ff2ec257938..0f9fff8aa8b 100644 --- a/vendor/rector/rector-phpunit/src/NodeFactory/ExpectExceptionMessageFactory.php +++ b/vendor/rector/rector-phpunit/src/NodeFactory/ExpectExceptionMessageFactory.php @@ -42,6 +42,9 @@ final class ExpectExceptionMessageFactory if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($methodCall, ['assertSame', 'assertEquals'])) { return null; } + if ($methodCall->isFirstClassCallable()) { + return null; + } $secondArgument = $methodCall->getArgs()[1]->value; if (!$secondArgument instanceof MethodCall) { return null; diff --git a/vendor/rector/rector-phpunit/src/NodeFactory/ExpectExceptionMessageRegExpFactory.php b/vendor/rector/rector-phpunit/src/NodeFactory/ExpectExceptionMessageRegExpFactory.php index 58c5b3f71a6..f62b3cc85b6 100644 --- a/vendor/rector/rector-phpunit/src/NodeFactory/ExpectExceptionMessageRegExpFactory.php +++ b/vendor/rector/rector-phpunit/src/NodeFactory/ExpectExceptionMessageRegExpFactory.php @@ -43,6 +43,9 @@ final class ExpectExceptionMessageRegExpFactory if (!$this->testsNodeAnalyzer->isInPHPUnitMethodCallName($methodCall, 'assertContains')) { return null; } + if ($methodCall->isFirstClassCallable()) { + return null; + } $secondArgument = $methodCall->getArgs()[1]->value; if (!$secondArgument instanceof MethodCall) { return null; diff --git a/vendor/rector/rector-phpunit/src/NodeManipulator/ArgumentMover.php b/vendor/rector/rector-phpunit/src/NodeManipulator/ArgumentMover.php index 04784597306..9399bc765b1 100644 --- a/vendor/rector/rector-phpunit/src/NodeManipulator/ArgumentMover.php +++ b/vendor/rector/rector-phpunit/src/NodeManipulator/ArgumentMover.php @@ -12,6 +12,9 @@ final class ArgumentMover */ public function removeFirst($node) : void { + if ($node->isFirstClassCallable()) { + return; + } $methodArguments = $node->getArgs(); \array_shift($methodArguments); $node->args = $methodArguments; diff --git a/vendor/rector/rector-phpunit/src/Rector/ClassMethod/CreateMockToAnonymousClassRector.php b/vendor/rector/rector-phpunit/src/Rector/ClassMethod/CreateMockToAnonymousClassRector.php index 2c3e75b2854..b0bd40d3ae7 100644 --- a/vendor/rector/rector-phpunit/src/Rector/ClassMethod/CreateMockToAnonymousClassRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/ClassMethod/CreateMockToAnonymousClassRector.php @@ -111,6 +111,9 @@ CODE_SAMPLE if (!$this->isName($rootMethodCall->name, 'method')) { continue; } + if ($methodCall->isFirstClassCallable()) { + continue; + } // has dynamic return? if ($hasDynamicReturnExprs === \false) { $returnedExpr = $methodCall->getArgs()[0]->value; @@ -127,6 +130,9 @@ CODE_SAMPLE // change to anonymous class /** @var MethodCall $methodCall */ $methodCall = $createMockMethodCallAssign->expr; + if ($methodCall->isFirstClassCallable()) { + continue; + } $firstArg = $methodCall->getArgs()[0]; $mockExpr = $createMockMethodCallAssign->var; $anonymousClass = $this->createAnonymousClass($firstArg); diff --git a/vendor/rector/rector-phpunit/src/Rector/Class_/ArrayArgumentToDataProviderRector.php b/vendor/rector/rector-phpunit/src/Rector/Class_/ArrayArgumentToDataProviderRector.php index 2441125c814..62ca20bda8f 100644 --- a/vendor/rector/rector-phpunit/src/Rector/Class_/ArrayArgumentToDataProviderRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/Class_/ArrayArgumentToDataProviderRector.php @@ -155,6 +155,9 @@ CODE_SAMPLE if (!$this->isMethodCallMatch($methodCall, $arrayArgumentToDataProvider)) { return; } + if ($methodCall->isFirstClassCallable()) { + return; + } if (\count($methodCall->getArgs()) !== 1) { throw new ShouldNotHappenException(); } diff --git a/vendor/rector/rector-phpunit/src/Rector/Class_/ProphecyPHPDocRector.php b/vendor/rector/rector-phpunit/src/Rector/Class_/ProphecyPHPDocRector.php index 0af8d47ebe3..2bf23489d38 100644 --- a/vendor/rector/rector-phpunit/src/Rector/Class_/ProphecyPHPDocRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/Class_/ProphecyPHPDocRector.php @@ -123,6 +123,9 @@ CODE_SAMPLE if (!$this->isName($expr->name, 'prophesize')) { return null; } + if ($expr->isFirstClassCallable()) { + return null; + } return $expr->getArgs()[0]; } /** diff --git a/vendor/rector/rector-phpunit/src/Rector/Foreach_/SimplifyForeachInstanceOfRector.php b/vendor/rector/rector-phpunit/src/Rector/Foreach_/SimplifyForeachInstanceOfRector.php index e04f31018cd..70f615f1a6a 100644 --- a/vendor/rector/rector-phpunit/src/Rector/Foreach_/SimplifyForeachInstanceOfRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/Foreach_/SimplifyForeachInstanceOfRector.php @@ -55,6 +55,9 @@ CODE_SAMPLE if (!$this->isName($expr->name, 'assertInstanceOf')) { return null; } + if ($expr->isFirstClassCallable()) { + return null; + } if (!$this->nodeComparator->areNodesEqual($node->valueVar, $expr->getArgs()[1]->value)) { return null; } diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertCompareToSpecificMethodRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertCompareToSpecificMethodRector.php index 3b6e00afb1b..f32f10864bf 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertCompareToSpecificMethodRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertCompareToSpecificMethodRector.php @@ -60,6 +60,9 @@ final class AssertCompareToSpecificMethodRector extends AbstractRector if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['assertSame', 'assertNotSame', 'assertEquals', 'assertNotEquals'])) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } // we need 2 args if (!isset($node->args[1])) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertComparisonToSpecificMethodRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertComparisonToSpecificMethodRector.php index c96672ad945..6d0110dd21d 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertComparisonToSpecificMethodRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertComparisonToSpecificMethodRector.php @@ -69,6 +69,9 @@ final class AssertComparisonToSpecificMethodRector extends AbstractRector if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['assertTrue', 'assertFalse'])) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } $firstArgumentValue = $node->getArgs()[0]->value; if (!$firstArgumentValue instanceof BinaryOp) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertEqualsParameterToSpecificMethodsTypeRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertEqualsParameterToSpecificMethodsTypeRector.php index 5f717af3ca3..2880acb238e 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertEqualsParameterToSpecificMethodsTypeRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertEqualsParameterToSpecificMethodsTypeRector.php @@ -86,6 +86,9 @@ CODE_SAMPLE if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['assertEquals', 'assertNotEquals'])) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } // 1. refactor to "assertEqualsIgnoringCase()" $newMethodCall = $this->processAssertEqualsIgnoringCase($node); if ($newMethodCall !== null) { diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertEqualsToSameRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertEqualsToSameRector.php index 60cd1f1e4e1..3375e6c23d6 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertEqualsToSameRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertEqualsToSameRector.php @@ -73,6 +73,9 @@ final class AssertEqualsToSameRector extends AbstractRector if (!$this->isNames($node->name, $methodNames)) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } $args = $node->getArgs(); if (!isset($args[0])) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertFalseStrposToContainsRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertFalseStrposToContainsRector.php index b266cf8bdce..5a9eb1c5030 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertFalseStrposToContainsRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertFalseStrposToContainsRector.php @@ -56,6 +56,9 @@ final class AssertFalseStrposToContainsRector extends AbstractRector if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, $oldMethodName)) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } $firstArgumentValue = $node->getArgs()[0]->value; if ($firstArgumentValue instanceof StaticCall) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertInstanceOfComparisonRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertInstanceOfComparisonRector.php index 846d0f03ce4..5213d87521e 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertInstanceOfComparisonRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertInstanceOfComparisonRector.php @@ -58,6 +58,9 @@ final class AssertInstanceOfComparisonRector extends AbstractRector if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, $oldMethodNames)) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } $firstArgumentValue = $node->getArgs()[0]->value; if (!$firstArgumentValue instanceof Instanceof_) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertIssetToSpecificMethodRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertIssetToSpecificMethodRector.php index 738c6d7b195..a00804d64e3 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertIssetToSpecificMethodRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertIssetToSpecificMethodRector.php @@ -81,6 +81,9 @@ final class AssertIssetToSpecificMethodRector extends AbstractRector if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, [self::ASSERT_TRUE, self::ASSERT_FALSE])) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } $firstArgumentValue = $node->getArgs()[0]->value; // is property access if (!$firstArgumentValue instanceof Isset_) { diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertNotOperatorRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertNotOperatorRector.php index e2009d33112..e4b1c66f7a8 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertNotOperatorRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertNotOperatorRector.php @@ -57,6 +57,9 @@ final class AssertNotOperatorRector extends AbstractRector if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, $oldMethodNames)) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } $firstArgumentValue = $node->getArgs()[0]->value; if (!$firstArgumentValue instanceof BooleanNot) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertPropertyExistsRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertPropertyExistsRector.php index e58296bf333..41e32fb3391 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertPropertyExistsRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertPropertyExistsRector.php @@ -70,6 +70,9 @@ CODE_SAMPLE if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['assertTrue', 'assertFalse'])) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } $firstArgumentValue = $node->getArgs()[0]->value; if (!$firstArgumentValue instanceof FuncCall) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertRegExpRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertRegExpRector.php index 9482da7597f..dd50d0452da 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertRegExpRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertRegExpRector.php @@ -65,6 +65,9 @@ final class AssertRegExpRector extends AbstractRector if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, [self::ASSERT_SAME, self::ASSERT_EQUALS, self::ASSERT_NOT_SAME, self::ASSERT_NOT_EQUALS])) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } /** @var FuncCall|Node $secondArgumentValue */ $secondArgumentValue = $node->getArgs()[1]->value; if (!$secondArgumentValue instanceof FuncCall) { diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertResourceToClosedResourceRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertResourceToClosedResourceRector.php index 74139f1ce77..cb741d8c3a9 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertResourceToClosedResourceRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertResourceToClosedResourceRector.php @@ -60,6 +60,9 @@ final class AssertResourceToClosedResourceRector extends AbstractRector if (!$this->isNames($node->name, $methodNames)) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } if (!isset($node->getArgs()[0])) { return null; } diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertSameBoolNullToSpecificMethodRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertSameBoolNullToSpecificMethodRector.php index ade87e845eb..3f65edff82d 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertSameBoolNullToSpecificMethodRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertSameBoolNullToSpecificMethodRector.php @@ -64,6 +64,9 @@ final class AssertSameBoolNullToSpecificMethodRector extends AbstractRector if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['assertSame', 'assertNotSame'])) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } $firstArgumentValue = $node->getArgs()[0]->value; if (!$firstArgumentValue instanceof ConstFetch) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertSameTrueFalseToAssertTrueFalseRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertSameTrueFalseToAssertTrueFalseRector.php index 2e5f8583ddd..a4f11ca807d 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertSameTrueFalseToAssertTrueFalseRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertSameTrueFalseToAssertTrueFalseRector.php @@ -74,6 +74,9 @@ CODE_SAMPLE if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['assertSame', 'assertEqual', 'assertNotSame', 'assertNotEqual'])) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } $firstArg = $node->getArgs()[0]; if ($this->valueResolver->isTrue($firstArg->value)) { $this->argumentMover->removeFirst($node); diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertTrueFalseInternalTypeToSpecificMethodRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertTrueFalseInternalTypeToSpecificMethodRector.php index 3b458d487b6..70ae9a58424 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertTrueFalseInternalTypeToSpecificMethodRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertTrueFalseInternalTypeToSpecificMethodRector.php @@ -62,6 +62,9 @@ final class AssertTrueFalseInternalTypeToSpecificMethodRector extends AbstractRe if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, $oldMethods)) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } $firstArgumentValue = $node->getArgs()[0]->value; if (!$firstArgumentValue instanceof FuncCall) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertTrueFalseToSpecificMethodRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertTrueFalseToSpecificMethodRector.php index b09dcd17604..1f7d2f20b29 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertTrueFalseToSpecificMethodRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertTrueFalseToSpecificMethodRector.php @@ -53,6 +53,9 @@ final class AssertTrueFalseToSpecificMethodRector extends AbstractRector if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['assertTrue', 'assertFalse', 'assertNotTrue', 'assertNotFalse'])) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } if (!isset($node->args[0])) { return null; } diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/ExplicitPhpErrorApiRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/ExplicitPhpErrorApiRector.php index be8e48e9c01..43519ad4d14 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/ExplicitPhpErrorApiRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/ExplicitPhpErrorApiRector.php @@ -96,6 +96,9 @@ CODE_SAMPLE */ private function replaceExceptionWith($node, string $exceptionClass, string $explicitMethod) : ?Node { + if ($node->isFirstClassCallable()) { + return null; + } if (!isset($node->getArgs()[0])) { return null; } diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/RemoveExpectAnyFromMockRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/RemoveExpectAnyFromMockRector.php index 0a7e2e64951..00d9a349a4e 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/RemoveExpectAnyFromMockRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/RemoveExpectAnyFromMockRector.php @@ -74,6 +74,9 @@ CODE_SAMPLE if (!$this->isName($node->name, 'expects')) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } if (\count($node->args) !== 1) { return null; } diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertContainsRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertContainsRector.php index 3d34bf6e468..ae31bf01e66 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertContainsRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertContainsRector.php @@ -73,6 +73,9 @@ CODE_SAMPLE if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['assertContains', 'assertNotContains'])) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } if (!$this->isPossiblyStringType($node->getArgs()[1]->value)) { return null; } diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertContainsWithoutIdentityRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertContainsWithoutIdentityRector.php index 0e042e6a81b..d8999dd18cb 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertContainsWithoutIdentityRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertContainsWithoutIdentityRector.php @@ -72,6 +72,9 @@ CODE_SAMPLE if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['assertContains', 'assertNotContains'])) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } // when second argument is string: do nothing $secondArgType = $this->getType($node->getArgs()[1]->value); if ($secondArgType instanceof StringType) { diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertInternalTypeRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertInternalTypeRector.php index 4ca3003d575..4c2d45dcf57 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertInternalTypeRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertInternalTypeRector.php @@ -73,6 +73,9 @@ CODE_SAMPLE if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['assertInternalType', 'assertNotInternalType'])) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } $typeNode = $node->getArgs()[0]->value; if (!$typeNode instanceof String_) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/UseSpecificWillMethodRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/UseSpecificWillMethodRector.php index 4496d0b05dd..fb8f1edb1c0 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/UseSpecificWillMethodRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/UseSpecificWillMethodRector.php @@ -77,6 +77,9 @@ CODE_SAMPLE if (!$this->isName($node->name, 'will')) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } $callArgs = $node->getArgs(); if (!$callArgs[0]->value instanceof MethodCall) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/UseSpecificWithMethodRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/UseSpecificWithMethodRector.php index 3c246b5c605..78cb7ed7378 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/UseSpecificWithMethodRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/UseSpecificWithMethodRector.php @@ -74,6 +74,9 @@ CODE_SAMPLE if (!$this->isName($node->name, 'with')) { return null; } + if ($node->isFirstClassCallable()) { + return null; + } foreach ($node->getArgs() as $i => $argNode) { if (!$argNode->value instanceof MethodCall) { continue; diff --git a/vendor/rector/rector-phpunit/src/Rector/StaticCall/GetMockRector.php b/vendor/rector/rector-phpunit/src/Rector/StaticCall/GetMockRector.php index e5a48b342d2..5ecf25456aa 100644 --- a/vendor/rector/rector-phpunit/src/Rector/StaticCall/GetMockRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/StaticCall/GetMockRector.php @@ -84,6 +84,9 @@ CODE_SAMPLE if ($classReflection instanceof ClassReflection && $classReflection->getName() !== 'PHPUnit\\Framework\\TestCase') { return null; } + if ($node->isFirstClassCallable()) { + return null; + } // narrow args to one if (\count($node->args) > 1) { $node->args = [$node->getArgs()[0]];