From 727b9f46f01b9077e8c1c35eeae4e0246020ad53 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Fri, 23 Dec 2022 17:10:25 +0000 Subject: [PATCH] Updated Rector to commit bfa1891c50677b01136a9308fd3c3ecc12e267d9 https://github.com/rectorphp/rector-src/commit/bfa1891c50677b01136a9308fd3c3ecc12e267d9 [cleanup] Remove 73 unused public methods (#3245) --- .../PhpDocInfo/PhpDocInfo.php | 69 ++-------- .../PhpDocManipulator/PhpDocTypeChanger.php | 3 + .../VarAnnotationManipulator.php | 37 +---- .../PhpDocParser/ClassAnnotationMatcher.php | 3 + .../StaticDoctrineAnnotationParser.php | 1 + .../Printer/PhpDocInfoPrinter.php | 2 +- .../Parser/BetterTokenIterator.php | 36 ++--- .../AbstractValuesAwareNode.php | 3 + .../ValueObject/StartAndEnd.php | 7 - packages/Caching/CacheFactory.php | 3 + .../ValueObject/RectorWithLineChange.php | 4 - .../FluentChainMethodCallNodeAnalyzer.php | 3 + .../SameClassMethodCallAnalyzer.php | 39 ------ .../NodeAnalyzer/ClassChildAnalyzer.php | 5 +- .../Parser/FileInfoParser.php | 1 + .../ValueObject/AddedFileWithContent.php | 3 + .../ArrayCallableDynamicMethod.php | 3 + .../NodeNameResolver/NodeNameResolver.php | 8 -- .../ScopeNestingComparator.php | 18 +-- .../ValueObject/ControlStructure.php | 8 -- packages/NodeRemoval/NodeRemover.php | 25 ++-- .../NodeTypeResolver/NodeTypeResolver.php | 1 + ...orBetterReflectionSourceLocatorFactory.php | 3 + .../DynamicSourceLocatorProvider.php | 3 + .../TypeAnalyzer/MethodTypeAnalyzer.php | 1 + packages/Parallel/WorkerRunner.php | 2 +- .../NodeFactory/DoctrineAnnotationFactory.php | 3 + .../NodeFactory/PhpAttributeGroupFactory.php | 3 + .../PhpNestedAttributeGroupFactory.php | 2 +- .../Collector/NodesToAddCollector.php | 1 + .../PostRector/Rector/UseAddingPostRector.php | 1 - .../ValueObject/Type/AliasedObjectType.php | 3 + .../Type/FullyQualifiedObjectType.php | 3 + .../Type/ShortenedGenericObjectType.php | 10 +- .../ValueObject/Type/ShortenedObjectType.php | 3 + .../Testing/Fixture/FixtureFileUpdater.php | 3 + packages/Testing/Fixture/FixtureSplitter.php | 1 + .../Testing/Fixture/FixtureTempFileDumper.php | 4 + .../ArgumentDefaultValueReplacer.php | 2 +- .../NodeFactory/PropertyTypeDecorator.php | 1 + ...xplicitMethodCallOverMagicGetSetRector.php | 5 +- .../Application/UseImportsRemover.php | 17 --- rules/CodingStyle/Naming/ClassNaming.php | 8 -- .../NodeAnalyzer/UseImportNameMatcher.php | 2 +- ...assKeywordForClassNameResolutionRector.php | 28 ++-- .../ValueObject/PropertyWithPhpDocInfo.php | 4 - ...ropertyConstructorInjectionManipulator.php | 3 + .../MatchPropertyTypeConflictingNameGuard.php | 2 +- rules/Naming/Naming/PropertyNaming.php | 1 + rules/Naming/Naming/VariableNaming.php | 2 +- .../FileInfoDeletionAnalyzer.php | 2 +- .../NodeFactory/ClassFromEnumFactory.php | 3 + .../NodeManipulator/VisibilityManipulator.php | 52 ++++---- .../Collector/MethodCallRenameCollector.php | 27 ---- .../Helper/RenameClassCallbackHandler.php | 2 +- .../Rector/MethodCall/RenameMethodRector.php | 10 +- .../Rector/New_/NewArgToMethodCallRector.php | 2 +- .../Guard/PhpDocNestedAnnotationGuard.php | 2 +- .../NodeAnalyzer/CallerParamMatcher.php | 30 ++--- .../StrictReturnNewAnalyzer.php | 2 +- ...ParamTypeFromStrictTypedPropertyRector.php | 10 +- ...FromStrictGetterMethodReturnTypeRector.php | 3 +- .../TypeInferer/ReturnTypeInferer.php | 7 +- rules/TypeDeclaration/TypeNormalizer.php | 37 ----- .../ValueObject/AddReturnTypeDeclaration.php | 3 + .../ValueObject/AssignToVariable.php | 13 +- src/Application/ApplicationFileProcessor.php | 2 +- .../RemovedAndAddedFilesCollector.php | 2 +- src/Application/VersionResolver.php | 6 +- src/Bootstrap/ExtensionConfigResolver.php | 1 + src/Configuration/ConfigurationFactory.php | 1 + src/Configuration/RectorConfigProvider.php | 6 + src/Configuration/ValueObjectInliner.php | 2 +- .../Output/OutputFormatterCollector.php | 10 +- src/Error/ExceptionCorrector.php | 17 --- src/Kernel/RectorKernel.php | 6 + src/NodeAnalyzer/CoalesceAnalyzer.php | 3 + src/NodeDecorator/NamespacedNameDecorator.php | 1 + src/NodeManipulator/ArrayManipulator.php | 9 ++ src/NodeManipulator/AssignManipulator.php | 1 + .../ClassDependencyManipulator.php | 4 + .../ClassInsertManipulator.php | 1 + src/NodeManipulator/ClassManipulator.php | 16 +-- .../ClassMethodManipulator.php | 50 +------ src/NodeManipulator/IfManipulator.php | 26 +--- src/NodeManipulator/MethodCallManipulator.php | 3 +- src/NodeManipulator/PropertyManipulator.php | 20 +-- src/Php/ReservedKeywordAnalyzer.php | 10 -- src/PhpParser/AstResolver.php | 7 - src/PhpParser/Node/BetterNodeFinder.php | 2 + src/PhpParser/Node/NamedVariableFactory.php | 3 + src/PhpParser/Node/NodeFactory.php | 29 +--- src/PhpParser/Node/Value/ValueResolver.php | 1 + src/PhpParser/NodeTransformer.php | 5 + src/PhpParser/Parser/SimplePhpParser.php | 1 + .../Printer/BetterStandardPrinter.php | 3 + .../Printer/FormatPerservingPrinter.php | 2 + src/Reporting/MissingRectorRulesReporter.php | 27 ++-- src/Util/ArrayParametersMerger.php | 23 ---- src/Util/Reflection/PrivatesAccessor.php | 19 +-- src/Validation/RectorAssert.php | 3 + src/ValueObject/Application/File.php | 4 - src/ValueObject/Error/SystemError.php | 4 - vendor/autoload.php | 2 +- vendor/clue/ndjson-react/CHANGELOG.md | 14 ++ vendor/clue/ndjson-react/README.md | 68 +++++----- vendor/clue/ndjson-react/composer.json | 16 +-- vendor/clue/ndjson-react/src/Decoder.php | 7 + vendor/composer/autoload_classmap.php | 2 - vendor/composer/autoload_real.php | 10 +- vendor/composer/autoload_static.php | 10 +- vendor/composer/installed.json | 126 +++++++++--------- vendor/composer/installed.php | 2 +- .../src/GeneratedConfig.php | 2 +- .../FuncCall/DowngradeBoolvalRector.php | 2 +- ...DowngradeClassConstantVisibilityRector.php | 17 +-- .../SimplePhpParameterReflection.php | 16 +-- vendor/symplify/easy-parallel/composer.json | 36 ++--- .../composer.json | 34 ++--- 119 files changed, 482 insertions(+), 820 deletions(-) delete mode 100644 packages/Defluent/NodeAnalyzer/SameClassMethodCallAnalyzer.php delete mode 100644 rules/Renaming/Collector/MethodCallRenameCollector.php diff --git a/packages/BetterPhpDocParser/PhpDocInfo/PhpDocInfo.php b/packages/BetterPhpDocParser/PhpDocInfo/PhpDocInfo.php index 8ed65a7d5c7..3c879b10da1 100644 --- a/packages/BetterPhpDocParser/PhpDocInfo/PhpDocInfo.php +++ b/packages/BetterPhpDocParser/PhpDocInfo/PhpDocInfo.php @@ -11,7 +11,6 @@ use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocChildNode; use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode; use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode; use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode; -use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTextNode; use PHPStan\PhpDocParser\Ast\PhpDoc\PropertyTagValueNode; use PHPStan\PhpDocParser\Ast\PhpDoc\ReturnTagValueNode; use PHPStan\PhpDocParser\Ast\PhpDoc\TemplateTagValueNode; @@ -177,15 +176,6 @@ final class PhpDocInfo { return $this->getTypeOrMixed($this->getReturnTagValue()); } - /** - * @template TNode as \PHPStan\PhpDocParser\Ast\Node - * @param class-string $type - * @return TNode[] - */ - public function getByType(string $type) : array - { - return $this->phpDocNodeByTypeFinder->findByType($this->phpDocNode, $type); - } /** * @param class-string $type */ @@ -233,6 +223,9 @@ final class PhpDocInfo $doctrineAnnotationTagValueNodes = $this->phpDocNodeByTypeFinder->findDoctrineAnnotationsByClasses($this->phpDocNode, $classes); return $doctrineAnnotationTagValueNodes[0] ?? null; } + /** + * @api doctrine/symfony + */ public function getByAnnotationClass(string $class) : ?DoctrineAnnotationTagValueNode { $doctrineAnnotationTagValueNodes = $this->phpDocNodeByTypeFinder->findDoctrineAnnotationsByClass($this->phpDocNode, $class); @@ -268,14 +261,6 @@ final class PhpDocInfo $foundTagValueNodes = $this->findByAnnotationClass($desiredClass); return $foundTagValueNodes[0] ?? null; } - /** - * @param class-string $desiredClass - * @return DoctrineAnnotationTagValueNode[] - */ - public function findByAnnotationClass(string $desiredClass) : array - { - return $this->phpDocNodeByTypeFinder->findDoctrineAnnotationsByClass($this->phpDocNode, $desiredClass); - } /** * @template T of \PHPStan\PhpDocParser\Ast\Node * @param class-string $typeToRemove @@ -302,18 +287,6 @@ final class PhpDocInfo return PhpDocNodeTraverser::NODE_REMOVE; }); } - /** - * @return array - */ - public function getParamTypesByName() : array - { - $paramTypesByName = []; - foreach ($this->phpDocNode->getParamTagValues() as $paramTagValueNode) { - $parameterType = $this->staticTypeMapper->mapPHPStanPhpDocTypeToPHPStanType($paramTagValueNode, $this->node); - $paramTypesByName[$paramTagValueNode->parameterName] = $parameterType; - } - return $paramTypesByName; - } public function addTagValueNode(PhpDocTagValueNode $phpDocTagValueNode) : void { if ($phpDocTagValueNode instanceof DoctrineAnnotationTagValueNode) { @@ -388,21 +361,6 @@ final class PhpDocInfo { return $this->phpDocNode->getTemplateTagValues(); } - public function hasInheritDoc() : bool - { - if ($this->hasByNames(['inheritdoc', 'inheritDoc'])) { - return \true; - } - foreach ($this->phpDocNode->children as $children) { - if (!$children instanceof PhpDocTextNode) { - continue; - } - if (\in_array($children->text, ['{@inheritdoc}', '{@inheritDoc}'], \true)) { - return \true; - } - } - return \false; - } /** * @deprecated * Should be handled by attributes of phpdoc node - if stard_and_end is missing in one of nodes, it has been changed @@ -431,17 +389,6 @@ final class PhpDocInfo $phpDocNodeTraverser->traverse($this->phpDocNode); return $changedPhpDocNodeVisitor->hasChanged(); } - /** - * @return string[] - */ - public function getMethodTagNames() : array - { - $methodTagNames = []; - foreach ($this->phpDocNode->getMethodTagValues() as $methodTagValueNode) { - $methodTagNames[] = $methodTagValueNode->methodName; - } - return $methodTagNames; - } public function makeMultiLined() : void { $this->isSingleLine = \false; @@ -450,7 +397,7 @@ final class PhpDocInfo { return $this->node; } - public function resolveNameForPhpDocTagValueNode(PhpDocTagValueNode $phpDocTagValueNode) : ?string + private function resolveNameForPhpDocTagValueNode(PhpDocTagValueNode $phpDocTagValueNode) : ?string { foreach (self::TAGS_TYPES_TO_NAMES as $tagValueNodeType => $name) { /** @var class-string $tagValueNodeType */ @@ -460,6 +407,14 @@ final class PhpDocInfo } return null; } + /** + * @param class-string $desiredClass + * @return DoctrineAnnotationTagValueNode[] + */ + private function findByAnnotationClass(string $desiredClass) : array + { + return $this->phpDocNodeByTypeFinder->findDoctrineAnnotationsByClass($this->phpDocNode, $desiredClass); + } /** * @return \PHPStan\Type\MixedType|\PHPStan\Type\Type */ diff --git a/packages/BetterPhpDocParser/PhpDocManipulator/PhpDocTypeChanger.php b/packages/BetterPhpDocParser/PhpDocManipulator/PhpDocTypeChanger.php index 5a0a2bc6c3c..49b9ac91874 100644 --- a/packages/BetterPhpDocParser/PhpDocManipulator/PhpDocTypeChanger.php +++ b/packages/BetterPhpDocParser/PhpDocManipulator/PhpDocTypeChanger.php @@ -221,6 +221,9 @@ final class PhpDocTypeChanger $this->changeParamType($phpDocInfo, $paramType, $param, $paramVarName); $this->processKeepComments($property, $param); } + /** + * @api doctrine + */ public function changeVarTypeNode(PhpDocInfo $phpDocInfo, TypeNode $typeNode) : void { // add completely new one diff --git a/packages/BetterPhpDocParser/PhpDocManipulator/VarAnnotationManipulator.php b/packages/BetterPhpDocParser/PhpDocManipulator/VarAnnotationManipulator.php index 88d2e26209f..4cc85442e03 100644 --- a/packages/BetterPhpDocParser/PhpDocManipulator/VarAnnotationManipulator.php +++ b/packages/BetterPhpDocParser/PhpDocManipulator/VarAnnotationManipulator.php @@ -4,15 +4,9 @@ declare (strict_types=1); namespace Rector\BetterPhpDocParser\PhpDocManipulator; use PhpParser\Node; -use PhpParser\Node\Stmt\Expression; -use PHPStan\PhpDocParser\Ast\PhpDoc\VarTagValueNode; use PHPStan\Type\MixedType; use PHPStan\Type\Type; -use PHPStan\Type\TypeWithClassName; -use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo; use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; -use Rector\BetterPhpDocParser\ValueObject\Type\FullyQualifiedIdentifierTypeNode; -use Rector\Core\PhpParser\Node\BetterNodeFinder; final class VarAnnotationManipulator { /** @@ -25,28 +19,10 @@ final class VarAnnotationManipulator * @var \Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTypeChanger */ private $phpDocTypeChanger; - /** - * @readonly - * @var \Rector\Core\PhpParser\Node\BetterNodeFinder - */ - private $betterNodeFinder; - public function __construct(PhpDocInfoFactory $phpDocInfoFactory, \Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTypeChanger $phpDocTypeChanger, BetterNodeFinder $betterNodeFinder) + public function __construct(PhpDocInfoFactory $phpDocInfoFactory, \Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTypeChanger $phpDocTypeChanger) { $this->phpDocInfoFactory = $phpDocInfoFactory; $this->phpDocTypeChanger = $phpDocTypeChanger; - $this->betterNodeFinder = $betterNodeFinder; - } - public function decorateNodeWithInlineVarType(Node $node, TypeWithClassName $typeWithClassName, string $variableName) : void - { - $phpDocInfo = $this->resolvePhpDocInfo($node); - // already done - if ($phpDocInfo->getVarTagValueNode() !== null) { - return; - } - $fullyQualifiedIdentifierTypeNode = new FullyQualifiedIdentifierTypeNode($typeWithClassName->getClassName()); - $varTagValueNode = new VarTagValueNode($fullyQualifiedIdentifierTypeNode, '$' . $variableName, ''); - $phpDocInfo->addTagValueNode($varTagValueNode); - $phpDocInfo->makeSingleLined(); } /** * @api @@ -59,15 +35,4 @@ final class VarAnnotationManipulator $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); $this->phpDocTypeChanger->changeVarType($phpDocInfo, $staticType); } - private function resolvePhpDocInfo(Node $node) : PhpDocInfo - { - $currentStmt = $this->betterNodeFinder->resolveCurrentStatement($node); - if ($currentStmt instanceof Expression) { - $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($currentStmt); - } else { - $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); - } - $phpDocInfo->makeSingleLined(); - return $phpDocInfo; - } } diff --git a/packages/BetterPhpDocParser/PhpDocParser/ClassAnnotationMatcher.php b/packages/BetterPhpDocParser/PhpDocParser/ClassAnnotationMatcher.php index 668a8c464f0..d97634061f6 100644 --- a/packages/BetterPhpDocParser/PhpDocParser/ClassAnnotationMatcher.php +++ b/packages/BetterPhpDocParser/PhpDocParser/ClassAnnotationMatcher.php @@ -43,6 +43,9 @@ final class ClassAnnotationMatcher $this->useImportsResolver = $useImportsResolver; $this->reflectionProvider = $reflectionProvider; } + /** + * @api doctrine + */ public function resolveTagToKnownFullyQualifiedName(string $tag, Property $property) : ?string { return $this->_resolveTagFullyQualifiedName($tag, $property, \true); diff --git a/packages/BetterPhpDocParser/PhpDocParser/StaticDoctrineAnnotationParser.php b/packages/BetterPhpDocParser/PhpDocParser/StaticDoctrineAnnotationParser.php index 58a10730cce..e1f9e1c30ba 100644 --- a/packages/BetterPhpDocParser/PhpDocParser/StaticDoctrineAnnotationParser.php +++ b/packages/BetterPhpDocParser/PhpDocParser/StaticDoctrineAnnotationParser.php @@ -50,6 +50,7 @@ final class StaticDoctrineAnnotationParser return $this->resolveAnnotationValues($tokenIterator); } /** + * @api tests * @see https://github.com/doctrine/annotations/blob/c66f06b7c83e9a2a7523351a9d5a4b55f885e574/lib/Doctrine/Common/Annotations/DocParser.php#L1215-L1224 * @return CurlyListNode|string|array|ConstExprNode|DoctrineAnnotationTagValueNode */ diff --git a/packages/BetterPhpDocParser/Printer/PhpDocInfoPrinter.php b/packages/BetterPhpDocParser/Printer/PhpDocInfoPrinter.php index 78e9bc4b7c9..41b8d3a1c63 100644 --- a/packages/BetterPhpDocParser/Printer/PhpDocInfoPrinter.php +++ b/packages/BetterPhpDocParser/Printer/PhpDocInfoPrinter.php @@ -143,7 +143,7 @@ final class PhpDocInfoPrinter // hotfix of extra space with callable () return Strings::replace($phpDocString, self::CALLABLE_REGEX, 'callable('); } - public function getCurrentPhpDocInfo() : PhpDocInfo + private function getCurrentPhpDocInfo() : PhpDocInfo { if ($this->phpDocInfo === null) { throw new ShouldNotHappenException(); diff --git a/packages/BetterPhpDocParser/ValueObject/Parser/BetterTokenIterator.php b/packages/BetterPhpDocParser/ValueObject/Parser/BetterTokenIterator.php index c59eee75b11..f8f6a1d953d 100644 --- a/packages/BetterPhpDocParser/ValueObject/Parser/BetterTokenIterator.php +++ b/packages/BetterPhpDocParser/ValueObject/Parser/BetterTokenIterator.php @@ -80,28 +80,6 @@ final class BetterTokenIterator extends TokenIterator } return $content; } - public function print() : string - { - $content = ''; - foreach ($this->getTokens() as $token) { - $content .= $token[0]; - } - return $content; - } - public function nextTokenType() : ?int - { - $tokens = $this->getTokens(); - // does next token exist? - $nextIndex = $this->currentPosition() + 1; - if (!isset($tokens[$nextIndex])) { - return null; - } - $this->pushSavePoint(); - $this->next(); - $nextTokenType = $this->currentTokenType(); - $this->rollback(); - return $nextTokenType; - } public function currentPosition() : int { return $this->privatesAccessor->getPrivateProperty($this, self::INDEX); @@ -133,4 +111,18 @@ final class BetterTokenIterator extends TokenIterator } return \false; } + private function nextTokenType() : ?int + { + $tokens = $this->getTokens(); + // does next token exist? + $nextIndex = $this->currentPosition() + 1; + if (!isset($tokens[$nextIndex])) { + return null; + } + $this->pushSavePoint(); + $this->next(); + $nextTokenType = $this->currentTokenType(); + $this->rollback(); + return $nextTokenType; + } } diff --git a/packages/BetterPhpDocParser/ValueObject/PhpDoc/DoctrineAnnotation/AbstractValuesAwareNode.php b/packages/BetterPhpDocParser/ValueObject/PhpDoc/DoctrineAnnotation/AbstractValuesAwareNode.php index 80ab36ed818..0c085199b7e 100644 --- a/packages/BetterPhpDocParser/ValueObject/PhpDoc/DoctrineAnnotation/AbstractValuesAwareNode.php +++ b/packages/BetterPhpDocParser/ValueObject/PhpDoc/DoctrineAnnotation/AbstractValuesAwareNode.php @@ -35,6 +35,9 @@ abstract class AbstractValuesAwareNode implements PhpDocTagValueNode $this->originalContent = $originalContent; $this->silentKey = $silentKey; } + /** + * @api + */ public function removeValue(string $desiredKey) : void { foreach ($this->values as $key => $value) { diff --git a/packages/BetterPhpDocParser/ValueObject/StartAndEnd.php b/packages/BetterPhpDocParser/ValueObject/StartAndEnd.php index 8cbac8e7ed8..df21edd4278 100644 --- a/packages/BetterPhpDocParser/ValueObject/StartAndEnd.php +++ b/packages/BetterPhpDocParser/ValueObject/StartAndEnd.php @@ -32,11 +32,4 @@ final class StartAndEnd { return $this->end; } - public function contains(int $position) : bool - { - if ($position < $this->start) { - return \false; - } - return $position < $this->end; - } } diff --git a/packages/Caching/CacheFactory.php b/packages/Caching/CacheFactory.php index c4c7bb3e78e..53675e6decb 100644 --- a/packages/Caching/CacheFactory.php +++ b/packages/Caching/CacheFactory.php @@ -25,6 +25,9 @@ final class CacheFactory $this->parameterProvider = $parameterProvider; $this->fileSystem = $fileSystem; } + /** + * @api config factory + */ public function create() : \Rector\Caching\Cache { $cacheDirectory = $this->parameterProvider->provideStringParameter(Option::CACHE_DIR); diff --git a/packages/ChangesReporting/ValueObject/RectorWithLineChange.php b/packages/ChangesReporting/ValueObject/RectorWithLineChange.php index 746e0aa078d..07ed5cf191e 100644 --- a/packages/ChangesReporting/ValueObject/RectorWithLineChange.php +++ b/packages/ChangesReporting/ValueObject/RectorWithLineChange.php @@ -44,10 +44,6 @@ final class RectorWithLineChange implements SerializableInterface { return $this->rectorClass; } - public function getLine() : int - { - return $this->line; - } /** * @param array $json * @return $this diff --git a/packages/Defluent/NodeAnalyzer/FluentChainMethodCallNodeAnalyzer.php b/packages/Defluent/NodeAnalyzer/FluentChainMethodCallNodeAnalyzer.php index 0f60e44ddc5..25e4a908b8c 100644 --- a/packages/Defluent/NodeAnalyzer/FluentChainMethodCallNodeAnalyzer.php +++ b/packages/Defluent/NodeAnalyzer/FluentChainMethodCallNodeAnalyzer.php @@ -13,6 +13,9 @@ use PhpParser\Node\Name; */ final class FluentChainMethodCallNodeAnalyzer { + /** + * @api doctrine + */ public function resolveRootMethodCall(MethodCall $methodCall) : ?MethodCall { $callerNode = $methodCall->var; diff --git a/packages/Defluent/NodeAnalyzer/SameClassMethodCallAnalyzer.php b/packages/Defluent/NodeAnalyzer/SameClassMethodCallAnalyzer.php deleted file mode 100644 index fa40b5a0109..00000000000 --- a/packages/Defluent/NodeAnalyzer/SameClassMethodCallAnalyzer.php +++ /dev/null @@ -1,39 +0,0 @@ -reflectionResolver = $reflectionResolver; - } - /** - * @param MethodCall[] $chainMethodCalls - */ - public function haveSingleClass(array $chainMethodCalls) : bool - { - // are method calls located in the same class? - $classOfClassMethod = []; - foreach ($chainMethodCalls as $chainMethodCall) { - $methodReflection = $this->reflectionResolver->resolveMethodReflectionFromMethodCall($chainMethodCall); - if ($methodReflection instanceof MethodReflection) { - $declaringClass = $methodReflection->getDeclaringClass(); - $classOfClassMethod[] = $declaringClass->getName(); - } else { - $classOfClassMethod[] = null; - } - } - $uniqueClasses = \array_unique($classOfClassMethod); - return \count($uniqueClasses) < 2; - } -} diff --git a/packages/FamilyTree/NodeAnalyzer/ClassChildAnalyzer.php b/packages/FamilyTree/NodeAnalyzer/ClassChildAnalyzer.php index 7a84a572843..6a103d4f7f1 100644 --- a/packages/FamilyTree/NodeAnalyzer/ClassChildAnalyzer.php +++ b/packages/FamilyTree/NodeAnalyzer/ClassChildAnalyzer.php @@ -58,6 +58,9 @@ final class ClassChildAnalyzer } return \false; } + /** + * @api downgrade + */ public function resolveParentClassMethodReturnType(ClassReflection $classReflection, string $methodName) : Type { $parentClassMethods = $this->resolveParentClassMethods($classReflection, $methodName); @@ -76,7 +79,7 @@ final class ClassChildAnalyzer /** * @return PhpMethodReflection[] */ - public function resolveParentClassMethods(ClassReflection $classReflection, string $methodName) : array + private function resolveParentClassMethods(ClassReflection $classReflection, string $methodName) : array { $parentClassMethods = []; $parents = \array_merge($classReflection->getParents(), $classReflection->getInterfaces()); diff --git a/packages/FileSystemRector/Parser/FileInfoParser.php b/packages/FileSystemRector/Parser/FileInfoParser.php index c2396f09d2d..471e728d1af 100644 --- a/packages/FileSystemRector/Parser/FileInfoParser.php +++ b/packages/FileSystemRector/Parser/FileInfoParser.php @@ -36,6 +36,7 @@ final class FileInfoParser $this->rectorParser = $rectorParser; } /** + * @api tests only * @return Stmt[] */ public function parseFileInfoToNodesAndDecorate(string $filePath) : array diff --git a/packages/FileSystemRector/ValueObject/AddedFileWithContent.php b/packages/FileSystemRector/ValueObject/AddedFileWithContent.php index 9a2ba1e4bfe..198dda539ca 100644 --- a/packages/FileSystemRector/ValueObject/AddedFileWithContent.php +++ b/packages/FileSystemRector/ValueObject/AddedFileWithContent.php @@ -5,6 +5,9 @@ namespace Rector\FileSystemRector\ValueObject; use Rector\Core\Exception\ShouldNotHappenException; use Rector\FileSystemRector\Contract\AddedFileInterface; +/** + * @api + */ final class AddedFileWithContent implements AddedFileInterface { /** diff --git a/packages/NodeCollector/ValueObject/ArrayCallableDynamicMethod.php b/packages/NodeCollector/ValueObject/ArrayCallableDynamicMethod.php index da19a67b32d..85a0c9a7867 100644 --- a/packages/NodeCollector/ValueObject/ArrayCallableDynamicMethod.php +++ b/packages/NodeCollector/ValueObject/ArrayCallableDynamicMethod.php @@ -5,6 +5,9 @@ namespace Rector\NodeCollector\ValueObject; use PhpParser\Node\Expr; use Rector\Core\Validation\RectorAssert; +/** + * @api + */ final class ArrayCallableDynamicMethod { /** diff --git a/packages/NodeNameResolver/NodeNameResolver.php b/packages/NodeNameResolver/NodeNameResolver.php index 26c6f25aceb..5b9146c5e6f 100644 --- a/packages/NodeNameResolver/NodeNameResolver.php +++ b/packages/NodeNameResolver/NodeNameResolver.php @@ -182,14 +182,6 @@ final class NodeNameResolver { return $this->classNaming->getShortName($name); } - /** - * @param array $renameMap - */ - public function matchNameFromMap(Node $node, array $renameMap) : ?string - { - $name = $this->getName($node); - return $renameMap[$name] ?? null; - } public function isStringName(string $resolvedName, string $desiredName) : bool { if ($desiredName === '') { diff --git a/packages/NodeNestingScope/ScopeNestingComparator.php b/packages/NodeNestingScope/ScopeNestingComparator.php index 319f09caceb..0bb4f6505b3 100644 --- a/packages/NodeNestingScope/ScopeNestingComparator.php +++ b/packages/NodeNestingScope/ScopeNestingComparator.php @@ -8,7 +8,6 @@ use PhpParser\Node\Expr; use PhpParser\Node\FunctionLike; use PhpParser\Node\Stmt\Else_; use PhpParser\Node\Stmt\If_; -use PhpParser\Node\Stmt\Return_; use Rector\Core\PhpParser\Comparing\NodeComparator; use Rector\Core\PhpParser\Node\BetterNodeFinder; use Rector\NodeNestingScope\ValueObject\ControlStructure; @@ -33,17 +32,6 @@ final class ScopeNestingComparator $this->betterNodeFinder = $betterNodeFinder; $this->nodeComparator = $nodeComparator; } - public function areReturnScopeNested(Return_ $return, Node $secondNodeScopeNode) : bool - { - $firstNodeScopeNode = $this->betterNodeFinder->findParentByTypes($return, ControlStructure::RETURN_ISOLATING_SCOPE_NODE_TYPES); - return $this->nodeComparator->areNodesEqual($firstNodeScopeNode, $secondNodeScopeNode); - } - public function areScopeNestingEqual(Node $firstNode, Node $secondNode) : bool - { - $firstNodeScopeNode = $this->findParentControlStructure($firstNode); - $secondNodeScopeNode = $this->findParentControlStructure($secondNode); - return $this->nodeComparator->areNodesEqual($firstNodeScopeNode, $secondNodeScopeNode); - } public function isNodeConditionallyScoped(Expr $expr) : bool { $foundParent = $this->betterNodeFinder->findParentByTypes($expr, ControlStructure::CONDITIONAL_NODE_SCOPE_TYPES + [FunctionLike::class]); @@ -62,7 +50,7 @@ final class ScopeNestingComparator } return \false; } - public function isInBothIfElseBranch(Node $foundParentNode, Expr $seekedExpr) : bool + private function isInBothIfElseBranch(Node $foundParentNode, Expr $seekedExpr) : bool { if ($foundParentNode instanceof Else_) { return $this->nodeComparator->isNodeEqual($seekedExpr, $this->doubleIfBranchExprs); @@ -85,8 +73,4 @@ final class ScopeNestingComparator } return \false; } - private function findParentControlStructure(Node $node) : ?Node - { - return $this->betterNodeFinder->findParentByTypes($node, ControlStructure::BREAKING_SCOPE_NODE_TYPES); - } } diff --git a/packages/NodeNestingScope/ValueObject/ControlStructure.php b/packages/NodeNestingScope/ValueObject/ControlStructure.php index 5b75c6dcbe9..e4b31be1476 100644 --- a/packages/NodeNestingScope/ValueObject/ControlStructure.php +++ b/packages/NodeNestingScope/ValueObject/ControlStructure.php @@ -4,28 +4,20 @@ declare (strict_types=1); namespace Rector\NodeNestingScope\ValueObject; use PhpParser\Node; -use PhpParser\Node\Expr\ArrowFunction; -use PhpParser\Node\Expr\Closure; use PhpParser\Node\Expr\Match_; use PhpParser\Node\FunctionLike; use PhpParser\Node\Stmt\Case_; use PhpParser\Node\Stmt\Catch_; -use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Do_; use PhpParser\Node\Stmt\Else_; use PhpParser\Node\Stmt\ElseIf_; use PhpParser\Node\Stmt\For_; use PhpParser\Node\Stmt\Foreach_; -use PhpParser\Node\Stmt\Function_; use PhpParser\Node\Stmt\If_; use PhpParser\Node\Stmt\Switch_; use PhpParser\Node\Stmt\While_; final class ControlStructure { - /** - * @var array> - */ - public const RETURN_ISOLATING_SCOPE_NODE_TYPES = [Function_::class, ClassMethod::class, Closure::class, ArrowFunction::class]; /** * @var array> */ diff --git a/packages/NodeRemoval/NodeRemover.php b/packages/NodeRemoval/NodeRemover.php index 668a4734782..739c741cd62 100644 --- a/packages/NodeRemoval/NodeRemover.php +++ b/packages/NodeRemoval/NodeRemover.php @@ -66,18 +66,6 @@ final class NodeRemover $this->removeNode($node); } } - /** - * @param \PhpParser\Node\Expr\Closure|\PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Function_ $functionLike - */ - public function removeStmt($functionLike, int $key) : void - { - if ($functionLike->stmts === null) { - throw new ShouldNotHappenException(); - } - // notify about remove node - $this->rectorChangeCollector->notifyNodeFileInfo($functionLike->stmts[$key]); - unset($functionLike->stmts[$key]); - } /** * @param int|\PhpParser\Node\Param $keyOrParam */ @@ -111,4 +99,17 @@ final class NodeRemover $this->rectorChangeCollector->notifyNodeFileInfo($node->args[$key]); unset($node->args[$key]); } + /** + * @api phpunit + * @param \PhpParser\Node\Expr\Closure|\PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Function_ $functionLike + */ + public function removeStmt($functionLike, int $key) : void + { + if ($functionLike->stmts === null) { + throw new ShouldNotHappenException(); + } + // notify about remove node + $this->rectorChangeCollector->notifyNodeFileInfo($functionLike->stmts[$key]); + unset($functionLike->stmts[$key]); + } } diff --git a/packages/NodeTypeResolver/NodeTypeResolver.php b/packages/NodeTypeResolver/NodeTypeResolver.php index 2af0a357eab..f87976bddd1 100644 --- a/packages/NodeTypeResolver/NodeTypeResolver.php +++ b/packages/NodeTypeResolver/NodeTypeResolver.php @@ -111,6 +111,7 @@ final class NodeTypeResolver } } /** + * @api doctrine symfony * @param ObjectType[] $requiredTypes */ public function isObjectTypes(Node $node, array $requiredTypes) : bool diff --git a/packages/NodeTypeResolver/Reflection/BetterReflection/RectorBetterReflectionSourceLocatorFactory.php b/packages/NodeTypeResolver/Reflection/BetterReflection/RectorBetterReflectionSourceLocatorFactory.php index e2f4bd49dc8..568508d791b 100644 --- a/packages/NodeTypeResolver/Reflection/BetterReflection/RectorBetterReflectionSourceLocatorFactory.php +++ b/packages/NodeTypeResolver/Reflection/BetterReflection/RectorBetterReflectionSourceLocatorFactory.php @@ -7,6 +7,9 @@ use PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator; use PHPStan\BetterReflection\SourceLocator\Type\MemoizingSourceLocator; use PHPStan\Reflection\BetterReflection\BetterReflectionSourceLocatorFactory; use Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocator\IntermediateSourceLocator; +/** + * @api used on phpstan config factory + */ final class RectorBetterReflectionSourceLocatorFactory { /** diff --git a/packages/NodeTypeResolver/Reflection/BetterReflection/SourceLocatorProvider/DynamicSourceLocatorProvider.php b/packages/NodeTypeResolver/Reflection/BetterReflection/SourceLocatorProvider/DynamicSourceLocatorProvider.php index 9c04905d260..5e1cc832d72 100644 --- a/packages/NodeTypeResolver/Reflection/BetterReflection/SourceLocatorProvider/DynamicSourceLocatorProvider.php +++ b/packages/NodeTypeResolver/Reflection/BetterReflection/SourceLocatorProvider/DynamicSourceLocatorProvider.php @@ -12,6 +12,9 @@ use PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedSingleFileSourceL use Rector\NodeTypeResolver\Contract\SourceLocatorProviderInterface; use Rector\Testing\PHPUnit\StaticPHPUnitEnvironment; use RectorPrefix202212\Webmozart\Assert\Assert; +/** + * @api phpstan external + */ final class DynamicSourceLocatorProvider implements SourceLocatorProviderInterface { /** diff --git a/packages/NodeTypeResolver/TypeAnalyzer/MethodTypeAnalyzer.php b/packages/NodeTypeResolver/TypeAnalyzer/MethodTypeAnalyzer.php index c80c4106882..d46270cdd46 100644 --- a/packages/NodeTypeResolver/TypeAnalyzer/MethodTypeAnalyzer.php +++ b/packages/NodeTypeResolver/TypeAnalyzer/MethodTypeAnalyzer.php @@ -21,6 +21,7 @@ final class MethodTypeAnalyzer $this->nodeTypeResolver = $nodeTypeResolver; } /** + * @api downgrade * @param class-string $expectedClass * @param non-empty-string $expectedMethod */ diff --git a/packages/Parallel/WorkerRunner.php b/packages/Parallel/WorkerRunner.php index 2b9a87cf1cb..fd60ac61add 100644 --- a/packages/Parallel/WorkerRunner.php +++ b/packages/Parallel/WorkerRunner.php @@ -126,7 +126,7 @@ final class WorkerRunner * @param array{system_errors: SystemError[], file_diffs: FileDiff[]}|mixed[] $errorAndFileDiffs * @return array{system_errors: SystemError[], file_diffs: FileDiff[]} */ - public function processFiles(File $file, Configuration $configuration, array $errorAndFileDiffs) : array + private function processFiles(File $file, Configuration $configuration, array $errorAndFileDiffs) : array { foreach ($this->fileProcessors as $fileProcessor) { if (!$fileProcessor->supports($file, $configuration)) { diff --git a/packages/PhpAttribute/NodeFactory/DoctrineAnnotationFactory.php b/packages/PhpAttribute/NodeFactory/DoctrineAnnotationFactory.php index 94f1189ad3d..6b3850e25c9 100644 --- a/packages/PhpAttribute/NodeFactory/DoctrineAnnotationFactory.php +++ b/packages/PhpAttribute/NodeFactory/DoctrineAnnotationFactory.php @@ -21,6 +21,9 @@ final class DoctrineAnnotationFactory { $this->nodePrinter = $nodePrinter; } + /** + * @api downgrade + */ public function createFromAttribute(Attribute $attribute, string $className) : DoctrineAnnotationTagValueNode { $items = $this->createItemsFromArgs($attribute->args); diff --git a/packages/PhpAttribute/NodeFactory/PhpAttributeGroupFactory.php b/packages/PhpAttribute/NodeFactory/PhpAttributeGroupFactory.php index 64c8d67071f..0f0fa60d2cc 100644 --- a/packages/PhpAttribute/NodeFactory/PhpAttributeGroupFactory.php +++ b/packages/PhpAttribute/NodeFactory/PhpAttributeGroupFactory.php @@ -65,6 +65,7 @@ final class PhpAttributeGroupFactory return new AttributeGroup([$attribute]); } /** + * @api tests * @param mixed[] $items */ public function createFromClassWithItems(string $attributeClass, array $items) : AttributeGroup @@ -89,6 +90,8 @@ final class PhpAttributeGroupFactory return new AttributeGroup([$attribute]); } /** + * @api tests + * * @param ArrayItemNode[]|mixed[] $items * @return Arg[] */ diff --git a/packages/PhpAttribute/NodeFactory/PhpNestedAttributeGroupFactory.php b/packages/PhpAttribute/NodeFactory/PhpNestedAttributeGroupFactory.php index e52fd27cfa2..af28a28ecd5 100644 --- a/packages/PhpAttribute/NodeFactory/PhpNestedAttributeGroupFactory.php +++ b/packages/PhpAttribute/NodeFactory/PhpNestedAttributeGroupFactory.php @@ -105,7 +105,7 @@ final class PhpNestedAttributeGroupFactory /** * @return Arg[] */ - public function createAttributeArgs(DoctrineAnnotationTagValueNode $nestedDoctrineAnnotationTagValueNode, NestedAnnotationToAttribute $nestedAnnotationToAttribute) : array + private function createAttributeArgs(DoctrineAnnotationTagValueNode $nestedDoctrineAnnotationTagValueNode, NestedAnnotationToAttribute $nestedAnnotationToAttribute) : array { $args = $this->createArgsFromItems($nestedDoctrineAnnotationTagValueNode->getValues(), $nestedAnnotationToAttribute); return $this->attributeArrayNameInliner->inlineArrayToArgs($args); diff --git a/packages/PostRector/Collector/NodesToAddCollector.php b/packages/PostRector/Collector/NodesToAddCollector.php index 4f9809b3e9f..11fff05e8a6 100644 --- a/packages/PostRector/Collector/NodesToAddCollector.php +++ b/packages/PostRector/Collector/NodesToAddCollector.php @@ -131,6 +131,7 @@ final class NodesToAddCollector implements NodeCollectorInterface unset($this->nodesToAddBefore[$objectHash]); } /** + * @api downgrade * @deprecated Return created nodes right in refactor() method to keep context instead. * @param Node[] $newNodes */ diff --git a/packages/PostRector/Rector/UseAddingPostRector.php b/packages/PostRector/Rector/UseAddingPostRector.php index a04ea1b6ca4..aa74b0e0993 100644 --- a/packages/PostRector/Rector/UseAddingPostRector.php +++ b/packages/PostRector/Rector/UseAddingPostRector.php @@ -92,7 +92,6 @@ final class UseAddingPostRector extends \Rector\PostRector\Rector\AbstractPostRe $namespace = $this->betterNodeFinder->findFirstInstanceOf($nodes, Namespace_::class); if ($namespace instanceof Namespace_) { // first clean - //$this->useImportsRemover->removeImportsFromNamespace($namespace, $removedShortUses); // then add, to prevent adding + removing false positive of same short use $this->useImportsAdder->addImportsToNamespace($namespace, $useImportTypes, $functionUseImportTypes); return $nodes; diff --git a/packages/StaticTypeMapper/ValueObject/Type/AliasedObjectType.php b/packages/StaticTypeMapper/ValueObject/Type/AliasedObjectType.php index dfc2fc6d575..64eca1eb83e 100644 --- a/packages/StaticTypeMapper/ValueObject/Type/AliasedObjectType.php +++ b/packages/StaticTypeMapper/ValueObject/Type/AliasedObjectType.php @@ -10,6 +10,9 @@ use PHPStan\Type\ObjectType; use PHPStan\Type\Type; use PHPStan\Type\TypeWithClassName; use Rector\NodeTypeResolver\Node\AttributeKey; +/** + * @api + */ final class AliasedObjectType extends ObjectType { /** diff --git a/packages/StaticTypeMapper/ValueObject/Type/FullyQualifiedObjectType.php b/packages/StaticTypeMapper/ValueObject/Type/FullyQualifiedObjectType.php index b6a9d790339..c49862b32c6 100644 --- a/packages/StaticTypeMapper/ValueObject/Type/FullyQualifiedObjectType.php +++ b/packages/StaticTypeMapper/ValueObject/Type/FullyQualifiedObjectType.php @@ -9,6 +9,9 @@ use PhpParser\Node\Stmt\Use_; use PhpParser\Node\Stmt\UseUse; use PHPStan\Type\ObjectType; use Rector\NodeTypeResolver\Node\AttributeKey; +/** + * @api + */ final class FullyQualifiedObjectType extends ObjectType { public function getShortNameType() : \Rector\StaticTypeMapper\ValueObject\Type\ShortenedObjectType diff --git a/packages/StaticTypeMapper/ValueObject/Type/ShortenedGenericObjectType.php b/packages/StaticTypeMapper/ValueObject/Type/ShortenedGenericObjectType.php index e843fbae0ef..88dee113e7b 100644 --- a/packages/StaticTypeMapper/ValueObject/Type/ShortenedGenericObjectType.php +++ b/packages/StaticTypeMapper/ValueObject/Type/ShortenedGenericObjectType.php @@ -6,6 +6,9 @@ namespace Rector\StaticTypeMapper\ValueObject\Type; use PHPStan\TrinaryLogic; use PHPStan\Type\Generic\GenericObjectType; use PHPStan\Type\Type; +/** + * @api + */ final class ShortenedGenericObjectType extends GenericObjectType { /** @@ -30,11 +33,4 @@ final class ShortenedGenericObjectType extends GenericObjectType { return $this->getClassName(); } - /** - * @return class-string - */ - public function getFullyQualifiedName() : string - { - return $this->fullyQualifiedName; - } } diff --git a/packages/StaticTypeMapper/ValueObject/Type/ShortenedObjectType.php b/packages/StaticTypeMapper/ValueObject/Type/ShortenedObjectType.php index bd2df3d52a1..66626aa4dda 100644 --- a/packages/StaticTypeMapper/ValueObject/Type/ShortenedObjectType.php +++ b/packages/StaticTypeMapper/ValueObject/Type/ShortenedObjectType.php @@ -6,6 +6,9 @@ namespace Rector\StaticTypeMapper\ValueObject\Type; use PHPStan\TrinaryLogic; use PHPStan\Type\ObjectType; use PHPStan\Type\Type; +/** + * @api + */ final class ShortenedObjectType extends ObjectType { /** diff --git a/packages/Testing/Fixture/FixtureFileUpdater.php b/packages/Testing/Fixture/FixtureFileUpdater.php index b429c4f7d34..0debfa91fcf 100644 --- a/packages/Testing/Fixture/FixtureFileUpdater.php +++ b/packages/Testing/Fixture/FixtureFileUpdater.php @@ -6,6 +6,9 @@ namespace Rector\Testing\Fixture; use RectorPrefix202212\Nette\Utils\FileSystem; final class FixtureFileUpdater { + /** + * @api + */ public static function updateFixtureContent(string $originalFilePath, string $changedContent, string $fixtureFilePath) : void { if (!\getenv('UPDATE_TESTS') && !\getenv('UT')) { diff --git a/packages/Testing/Fixture/FixtureSplitter.php b/packages/Testing/Fixture/FixtureSplitter.php index 3c9dadff7d5..c57592b0cd7 100644 --- a/packages/Testing/Fixture/FixtureSplitter.php +++ b/packages/Testing/Fixture/FixtureSplitter.php @@ -9,6 +9,7 @@ use RectorPrefix202212\Webmozart\Assert\Assert; final class FixtureSplitter { /** + * @api * @var string * @see https://regex101.com/r/zZDoyy/1 */ diff --git a/packages/Testing/Fixture/FixtureTempFileDumper.php b/packages/Testing/Fixture/FixtureTempFileDumper.php index 2475ce267f1..6e845be3bad 100644 --- a/packages/Testing/Fixture/FixtureTempFileDumper.php +++ b/packages/Testing/Fixture/FixtureTempFileDumper.php @@ -7,6 +7,7 @@ use RectorPrefix202212\Nette\Utils\FileSystem; final class FixtureTempFileDumper { /** + * @api * @var string */ public const TEMP_FIXTURE_DIRECTORY = '/rector/tests_fixture_'; @@ -17,6 +18,9 @@ final class FixtureTempFileDumper FileSystem::write($temporaryFileName, $fileContents); return $temporaryFileName; } + /** + * @api + */ public static function getTempDirectory() : string { return \sys_get_temp_dir() . self::TEMP_FIXTURE_DIRECTORY; diff --git a/rules/Arguments/ArgumentDefaultValueReplacer.php b/rules/Arguments/ArgumentDefaultValueReplacer.php index fc464852c4e..8945bcd02ed 100644 --- a/rules/Arguments/ArgumentDefaultValueReplacer.php +++ b/rules/Arguments/ArgumentDefaultValueReplacer.php @@ -52,7 +52,7 @@ final class ArgumentDefaultValueReplacer /** * @param mixed $value */ - public function isDefaultValueMatched(?Expr $expr, $value) : bool + private function isDefaultValueMatched(?Expr $expr, $value) : bool { // allow any values before, also allow param without default value if ($value === ReplaceArgumentDefaultValue::ANY_VALUE_BEFORE) { diff --git a/rules/CodeQuality/NodeFactory/PropertyTypeDecorator.php b/rules/CodeQuality/NodeFactory/PropertyTypeDecorator.php index a6d9c487f37..c50a827d48f 100644 --- a/rules/CodeQuality/NodeFactory/PropertyTypeDecorator.php +++ b/rules/CodeQuality/NodeFactory/PropertyTypeDecorator.php @@ -61,6 +61,7 @@ final class PropertyTypeDecorator $this->decoratePropertyWithType($property, $propertyType); } /** + * @api downgrade * @param \PhpParser\Node\ComplexType|\PhpParser\Node\Identifier|\PhpParser\Node\Name $typeNode */ public function decoratePropertyWithDocBlock(Property $property, $typeNode) : void diff --git a/rules/CodeQuality/Rector/PropertyFetch/ExplicitMethodCallOverMagicGetSetRector.php b/rules/CodeQuality/Rector/PropertyFetch/ExplicitMethodCallOverMagicGetSetRector.php index 79ac303e4f9..af049b01d48 100644 --- a/rules/CodeQuality/Rector/PropertyFetch/ExplicitMethodCallOverMagicGetSetRector.php +++ b/rules/CodeQuality/Rector/PropertyFetch/ExplicitMethodCallOverMagicGetSetRector.php @@ -101,9 +101,10 @@ CODE_SAMPLE /** * @return string[] */ - public function resolvePossibleGetMethodNames(string $propertyName) : array + private function resolvePossibleGetMethodNames(string $propertyName) : array { - return ['get' . \ucfirst($propertyName), 'has' . \ucfirst($propertyName), 'is' . \ucfirst($propertyName)]; + $upperPropertyName = \ucfirst($propertyName); + return ['get' . $upperPropertyName, 'has' . $upperPropertyName, 'is' . $upperPropertyName]; } private function shouldSkipPropertyFetch(PropertyFetch $propertyFetch) : bool { diff --git a/rules/CodingStyle/Application/UseImportsRemover.php b/rules/CodingStyle/Application/UseImportsRemover.php index 86ace032b02..be6966e8e86 100644 --- a/rules/CodingStyle/Application/UseImportsRemover.php +++ b/rules/CodingStyle/Application/UseImportsRemover.php @@ -4,7 +4,6 @@ declare (strict_types=1); namespace Rector\CodingStyle\Application; use PhpParser\Node\Stmt; -use PhpParser\Node\Stmt\Namespace_; use PhpParser\Node\Stmt\Use_; final class UseImportsRemover { @@ -27,22 +26,6 @@ final class UseImportsRemover } return $stmts; } - /** - * @param string[] $removedShortUses - */ - public function removeImportsFromNamespace(Namespace_ $namespace, array $removedShortUses) : void - { - foreach ($namespace->stmts as $namespaceKey => $stmt) { - if (!$stmt instanceof Use_) { - continue; - } - $this->removeUseFromUse($removedShortUses, $stmt); - // nothing left → remove - if ($stmt->uses === []) { - unset($namespace->stmts[$namespaceKey]); - } - } - } /** * @param string[] $removedShortUses */ diff --git a/rules/CodingStyle/Naming/ClassNaming.php b/rules/CodingStyle/Naming/ClassNaming.php index 51c325713ed..041bd3b1128 100644 --- a/rules/CodingStyle/Naming/ClassNaming.php +++ b/rules/CodingStyle/Naming/ClassNaming.php @@ -9,14 +9,6 @@ use PhpParser\Node\Name; use PhpParser\Node\Stmt\ClassLike; final class ClassNaming { - /** - * @param string|\PhpParser\Node\Name|\PhpParser\Node\Identifier $name - */ - public function getVariableName($name) : string - { - $shortName = $this->getShortName($name); - return \lcfirst($shortName); - } /** * @param string|\PhpParser\Node\Name|\PhpParser\Node\Identifier|\PhpParser\Node\Stmt\ClassLike $name */ diff --git a/rules/CodingStyle/NodeAnalyzer/UseImportNameMatcher.php b/rules/CodingStyle/NodeAnalyzer/UseImportNameMatcher.php index 133429bc8c3..bde4def5b8d 100644 --- a/rules/CodingStyle/NodeAnalyzer/UseImportNameMatcher.php +++ b/rules/CodingStyle/NodeAnalyzer/UseImportNameMatcher.php @@ -63,7 +63,7 @@ final class UseImportNameMatcher } return null; } - public function resolveName(string $prefix, string $tag, UseUse $useUse) : string + private function resolveName(string $prefix, string $tag, UseUse $useUse) : string { // useuse can be renamed on the fly, so just in case, use the original one $originalUseUse = $useUse->getAttribute(AttributeKey::ORIGINAL_NODE); diff --git a/rules/CodingStyle/Rector/String_/UseClassKeywordForClassNameResolutionRector.php b/rules/CodingStyle/Rector/String_/UseClassKeywordForClassNameResolutionRector.php index f149332b04b..3745b654224 100644 --- a/rules/CodingStyle/Rector/String_/UseClassKeywordForClassNameResolutionRector.php +++ b/rules/CodingStyle/Rector/String_/UseClassKeywordForClassNameResolutionRector.php @@ -70,10 +70,23 @@ CODE_SAMPLE $exprsToConcat = $this->createExpressionsToConcat($parts); return $this->nodeFactory->createConcat($exprsToConcat); } + /** + * @param string[] $classNames + * @return mixed[] + */ + private function getParts(String_ $string, array $classNames) : array + { + $quotedClassNames = \array_map('preg_quote', $classNames); + // @see https://regex101.com/r/8nGS0F/1 + $parts = Strings::split($string->value, '#(' . \implode('|', $quotedClassNames) . ')#'); + return \array_filter($parts, static function (string $className) : bool { + return $className !== ''; + }); + } /** * @return string[] */ - public function getExistingClasses(String_ $string) : array + private function getExistingClasses(String_ $string) : array { /** @var mixed[] $matches */ $matches = Strings::matchAll($string->value, self::CLASS_BEFORE_STATIC_ACCESS_REGEX, \PREG_PATTERN_ORDER); @@ -89,19 +102,6 @@ CODE_SAMPLE } return $classNames; } - /** - * @param string[] $classNames - * @return mixed[] - */ - public function getParts(String_ $string, array $classNames) : array - { - $quotedClassNames = \array_map('preg_quote', $classNames); - // @see https://regex101.com/r/8nGS0F/1 - $parts = Strings::split($string->value, '#(' . \implode('|', $quotedClassNames) . ')#'); - return \array_filter($parts, static function (string $className) : bool { - return $className !== ''; - }); - } /** * @param string[] $parts * @return ClassConstFetch[]|String_[] diff --git a/rules/Compatibility/ValueObject/PropertyWithPhpDocInfo.php b/rules/Compatibility/ValueObject/PropertyWithPhpDocInfo.php index a9d712845bb..4caa7364db1 100644 --- a/rules/Compatibility/ValueObject/PropertyWithPhpDocInfo.php +++ b/rules/Compatibility/ValueObject/PropertyWithPhpDocInfo.php @@ -39,10 +39,6 @@ final class PropertyWithPhpDocInfo { return $this->phpDocInfo; } - public function getPropertyName() : string - { - return $this->propertyName; - } public function getParamTagValueNode() : ParamTagValueNode { $varTagValueNode = $this->phpDocInfo->getVarTagValueNode(); diff --git a/rules/DependencyInjection/NodeManipulator/PropertyConstructorInjectionManipulator.php b/rules/DependencyInjection/NodeManipulator/PropertyConstructorInjectionManipulator.php index ee9ed294dba..6883ea6a4ae 100644 --- a/rules/DependencyInjection/NodeManipulator/PropertyConstructorInjectionManipulator.php +++ b/rules/DependencyInjection/NodeManipulator/PropertyConstructorInjectionManipulator.php @@ -56,6 +56,9 @@ final class PropertyConstructorInjectionManipulator $this->propertyToAddCollector = $propertyToAddCollector; $this->betterNodeFinder = $betterNodeFinder; } + /** + * @api symfony + */ public function refactor(Property $property, Type $type, DoctrineAnnotationTagValueNode $doctrineAnnotationTagValueNode) : void { $propertyName = $this->nodeNameResolver->getName($property); diff --git a/rules/Naming/Guard/PropertyConflictingNameGuard/MatchPropertyTypeConflictingNameGuard.php b/rules/Naming/Guard/PropertyConflictingNameGuard/MatchPropertyTypeConflictingNameGuard.php index 486e8e3e0d8..9c339f639f1 100644 --- a/rules/Naming/Guard/PropertyConflictingNameGuard/MatchPropertyTypeConflictingNameGuard.php +++ b/rules/Naming/Guard/PropertyConflictingNameGuard/MatchPropertyTypeConflictingNameGuard.php @@ -39,7 +39,7 @@ final class MatchPropertyTypeConflictingNameGuard /** * @return string[] */ - public function resolve(ClassLike $classLike) : array + private function resolve(ClassLike $classLike) : array { $expectedNames = []; foreach ($classLike->getProperties() as $property) { diff --git a/rules/Naming/Naming/PropertyNaming.php b/rules/Naming/Naming/PropertyNaming.php index 6e2b217beda..29c799233df 100644 --- a/rules/Naming/Naming/PropertyNaming.php +++ b/rules/Naming/Naming/PropertyNaming.php @@ -113,6 +113,7 @@ final class PropertyNaming return $this->prolongIfTooShort($variableName, $className); } /** + * @api symfony * @see https://stackoverflow.com/a/2792045/1348344 */ public function underscoreToName(string $underscoreName) : string diff --git a/rules/Naming/Naming/VariableNaming.php b/rules/Naming/Naming/VariableNaming.php index e3ade34d871..53e4dd24b3a 100644 --- a/rules/Naming/Naming/VariableNaming.php +++ b/rules/Naming/Naming/VariableNaming.php @@ -87,7 +87,7 @@ final class VariableNaming $bareName = $this->resolveBareFuncCallArgumentName($funcCall, $fallbackName, $suffix); return $this->createCountedValueName($bareName, $scope); } - public function resolveFromNodeAndType(Node $node, Type $type) : ?string + private function resolveFromNodeAndType(Node $node, Type $type) : ?string { $variableName = $this->resolveBareFromNode($node); if ($variableName === null) { diff --git a/rules/PSR4/FileInfoAnalyzer/FileInfoDeletionAnalyzer.php b/rules/PSR4/FileInfoAnalyzer/FileInfoDeletionAnalyzer.php index 1a81a041034..24762de8923 100644 --- a/rules/PSR4/FileInfoAnalyzer/FileInfoDeletionAnalyzer.php +++ b/rules/PSR4/FileInfoAnalyzer/FileInfoDeletionAnalyzer.php @@ -39,7 +39,7 @@ final class FileInfoDeletionAnalyzer $classShortName = $this->classNaming->getShortName($className); return $baseFileName === $classShortName; } - public function clearNameFromTestingPrefix(string $name) : string + private function clearNameFromTestingPrefix(string $name) : string { return Strings::replace($name, self::TESTING_PREFIX_REGEX, ''); } diff --git a/rules/Php81/NodeFactory/ClassFromEnumFactory.php b/rules/Php81/NodeFactory/ClassFromEnumFactory.php index 6ba77a54142..e2497605f1f 100644 --- a/rules/Php81/NodeFactory/ClassFromEnumFactory.php +++ b/rules/Php81/NodeFactory/ClassFromEnumFactory.php @@ -23,6 +23,9 @@ final class ClassFromEnumFactory { $this->nodeNameResolver = $nodeNameResolver; } + /** + * @api downgrade + */ public function createFromEnum(Enum_ $enum) : Class_ { $shortClassName = $this->nodeNameResolver->getShortName($enum); diff --git a/rules/Privatization/NodeManipulator/VisibilityManipulator.php b/rules/Privatization/NodeManipulator/VisibilityManipulator.php index 43afce2dfc3..34c482a3701 100644 --- a/rules/Privatization/NodeManipulator/VisibilityManipulator.php +++ b/rules/Privatization/NodeManipulator/VisibilityManipulator.php @@ -41,13 +41,6 @@ final class VisibilityManipulator } $node->flags -= Class_::MODIFIER_STATIC; } - /** - * @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Class_ $node - */ - public function makeAbstract($node) : void - { - $this->addVisibilityFlag($node, Visibility::ABSTRACT); - } /** * @api * @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Class_ $node @@ -77,27 +70,6 @@ final class VisibilityManipulator } $node->flags -= Class_::MODIFIER_FINAL; } - /** - * This way "abstract", "static", "final" are kept - * @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Property|\PhpParser\Node\Stmt\ClassConst $node - */ - public function removeVisibility($node) : void - { - // no modifier - if ($node->flags === 0) { - return; - } - if ($node->isPublic()) { - $node->flags |= Class_::MODIFIER_PUBLIC; - $node->flags -= Class_::MODIFIER_PUBLIC; - } - if ($node->isProtected()) { - $node->flags -= Class_::MODIFIER_PROTECTED; - } - if ($node->isPrivate()) { - $node->flags -= Class_::MODIFIER_PRIVATE; - } - } /** * @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Property|\PhpParser\Node\Stmt\ClassConst $node */ @@ -135,6 +107,9 @@ final class VisibilityManipulator { $node->flags -= Class_::MODIFIER_FINAL; } + /** + * @api downgrade + */ public function removeAbstract(ClassMethod $classMethod) : void { $classMethod->flags -= Class_::MODIFIER_ABSTRACT; @@ -160,6 +135,27 @@ final class VisibilityManipulator { $this->removeVisibilityFlag($node, Visibility::READONLY); } + /** + * This way "abstract", "static", "final" are kept + * @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Property|\PhpParser\Node\Stmt\ClassConst $node + */ + private function removeVisibility($node) : void + { + // no modifier + if ($node->flags === 0) { + return; + } + if ($node->isPublic()) { + $node->flags |= Class_::MODIFIER_PUBLIC; + $node->flags -= Class_::MODIFIER_PUBLIC; + } + if ($node->isProtected()) { + $node->flags -= Class_::MODIFIER_PROTECTED; + } + if ($node->isPrivate()) { + $node->flags -= Class_::MODIFIER_PRIVATE; + } + } /** * @api * @param \PhpParser\Node\Stmt\Class_|\PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Property|\PhpParser\Node\Stmt\ClassConst|\PhpParser\Node\Param $node diff --git a/rules/Renaming/Collector/MethodCallRenameCollector.php b/rules/Renaming/Collector/MethodCallRenameCollector.php deleted file mode 100644 index f1f4336f384..00000000000 --- a/rules/Renaming/Collector/MethodCallRenameCollector.php +++ /dev/null @@ -1,27 +0,0 @@ -methodCallRenames = \array_merge($this->methodCallRenames, $methodCallRenames); - } - /** - * @return MethodCallRenameInterface[] - */ - public function getMethodCallRenames() : array - { - return $this->methodCallRenames; - } -} diff --git a/rules/Renaming/Helper/RenameClassCallbackHandler.php b/rules/Renaming/Helper/RenameClassCallbackHandler.php index 59182f9eb27..628c38b3799 100644 --- a/rules/Renaming/Helper/RenameClassCallbackHandler.php +++ b/rules/Renaming/Helper/RenameClassCallbackHandler.php @@ -62,7 +62,7 @@ final class RenameClassCallbackHandler extends NodeVisitorAbstract /** * @return array */ - public function handleClassLike(ClassLike $classLike) : array + private function handleClassLike(ClassLike $classLike) : array { $oldToNewClasses = []; $className = $classLike->name; diff --git a/rules/Renaming/Rector/MethodCall/RenameMethodRector.php b/rules/Renaming/Rector/MethodCall/RenameMethodRector.php index b9795d411cd..1d263f71881 100644 --- a/rules/Renaming/Rector/MethodCall/RenameMethodRector.php +++ b/rules/Renaming/Rector/MethodCall/RenameMethodRector.php @@ -18,7 +18,6 @@ use Rector\Core\Contract\Rector\ConfigurableRectorInterface; use Rector\Core\NodeManipulator\ClassManipulator; use Rector\Core\Rector\AbstractScopeAwareRector; use Rector\Core\Reflection\ReflectionResolver; -use Rector\Renaming\Collector\MethodCallRenameCollector; use Rector\Renaming\Contract\MethodCallRenameInterface; use Rector\Renaming\ValueObject\MethodCallRename; use Rector\Renaming\ValueObject\MethodCallRenameWithArrayKey; @@ -39,11 +38,6 @@ final class RenameMethodRector extends AbstractScopeAwareRector implements Confi * @var \Rector\Core\NodeManipulator\ClassManipulator */ private $classManipulator; - /** - * @readonly - * @var \Rector\Renaming\Collector\MethodCallRenameCollector - */ - private $methodCallRenameCollector; /** * @readonly * @var \Rector\Core\Reflection\ReflectionResolver @@ -54,10 +48,9 @@ final class RenameMethodRector extends AbstractScopeAwareRector implements Confi * @var \PHPStan\Reflection\ReflectionProvider */ private $reflectionProvider; - public function __construct(ClassManipulator $classManipulator, MethodCallRenameCollector $methodCallRenameCollector, ReflectionResolver $reflectionResolver, ReflectionProvider $reflectionProvider) + public function __construct(ClassManipulator $classManipulator, ReflectionResolver $reflectionResolver, ReflectionProvider $reflectionProvider) { $this->classManipulator = $classManipulator; - $this->methodCallRenameCollector = $methodCallRenameCollector; $this->reflectionResolver = $reflectionResolver; $this->reflectionProvider = $reflectionProvider; } @@ -114,7 +107,6 @@ CODE_SAMPLE { Assert::allIsAOf($configuration, MethodCallRenameInterface::class); $this->methodCallRenames = $configuration; - $this->methodCallRenameCollector->addMethodCallRenames($configuration); } /** * @param \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Stmt\ClassMethod $node diff --git a/rules/Transform/Rector/New_/NewArgToMethodCallRector.php b/rules/Transform/Rector/New_/NewArgToMethodCallRector.php index 937d8b30aca..8bb98ed043a 100644 --- a/rules/Transform/Rector/New_/NewArgToMethodCallRector.php +++ b/rules/Transform/Rector/New_/NewArgToMethodCallRector.php @@ -74,7 +74,7 @@ CODE_SAMPLE continue; } unset($node->args[0]); - return new MethodCall($node, 'usePutenv'); + return new MethodCall($node, $newArgToMethodCall->getMethodCall()); } return null; } diff --git a/rules/TypeDeclaration/Guard/PhpDocNestedAnnotationGuard.php b/rules/TypeDeclaration/Guard/PhpDocNestedAnnotationGuard.php index 6ed2eeb5c77..94ab7d89c40 100644 --- a/rules/TypeDeclaration/Guard/PhpDocNestedAnnotationGuard.php +++ b/rules/TypeDeclaration/Guard/PhpDocNestedAnnotationGuard.php @@ -46,7 +46,7 @@ final class PhpDocNestedAnnotationGuard $parsedPhpDocText = (string) $phpDocInfo->getPhpDocNode(); return !$this->hasAnnotationCountChanged($originalPhpDocText, $parsedPhpDocText); } - public function hasAnnotationCountChanged(string $originalPhpDocText, string $updatedPhpDocText) : bool + private function hasAnnotationCountChanged(string $originalPhpDocText, string $updatedPhpDocText) : bool { $originalAnnotationCount = \count(Strings::matchAll($originalPhpDocText, self::SIMPLE_ANNOTATION_REGEX)); $reconstructedAnnotationCount = \count(Strings::matchAll($updatedPhpDocText, self::SIMPLE_ANNOTATION_REGEX)); diff --git a/rules/TypeDeclaration/NodeAnalyzer/CallerParamMatcher.php b/rules/TypeDeclaration/NodeAnalyzer/CallerParamMatcher.php index c5a2f7b6eed..ab8f8723759 100644 --- a/rules/TypeDeclaration/NodeAnalyzer/CallerParamMatcher.php +++ b/rules/TypeDeclaration/NodeAnalyzer/CallerParamMatcher.php @@ -48,21 +48,6 @@ final class CallerParamMatcher } return $callParam->type; } - /** - * @param \PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\FuncCall $call - */ - public function matchCallParam($call, Param $param, Scope $scope) : ?Param - { - $callArgPosition = $this->matchCallArgPosition($call, $param); - if ($callArgPosition === null) { - return null; - } - $classMethodOrFunction = $this->astResolver->resolveClassMethodOrFunctionFromCall($call, $scope); - if ($classMethodOrFunction === null) { - return null; - } - return $classMethodOrFunction->params[$callArgPosition] ?? null; - } public function matchParentParam(StaticCall $parentStaticCall, Param $param, Scope $scope) : ?Param { $methodName = $this->nodeNameResolver->getName($parentStaticCall->name); @@ -76,6 +61,21 @@ final class CallerParamMatcher } return $this->resolveParentMethodParam($scope, $methodName, $parentStaticCallArgPosition); } + /** + * @param \PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\FuncCall $call + */ + private function matchCallParam($call, Param $param, Scope $scope) : ?Param + { + $callArgPosition = $this->matchCallArgPosition($call, $param); + if ($callArgPosition === null) { + return null; + } + $classMethodOrFunction = $this->astResolver->resolveClassMethodOrFunctionFromCall($call, $scope); + if ($classMethodOrFunction === null) { + return null; + } + return $classMethodOrFunction->params[$callArgPosition] ?? null; + } /** * @param \PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\FuncCall $call */ diff --git a/rules/TypeDeclaration/NodeAnalyzer/ReturnTypeAnalyzer/StrictReturnNewAnalyzer.php b/rules/TypeDeclaration/NodeAnalyzer/ReturnTypeAnalyzer/StrictReturnNewAnalyzer.php index ff08cee932c..ed2403b8a53 100644 --- a/rules/TypeDeclaration/NodeAnalyzer/ReturnTypeAnalyzer/StrictReturnNewAnalyzer.php +++ b/rules/TypeDeclaration/NodeAnalyzer/ReturnTypeAnalyzer/StrictReturnNewAnalyzer.php @@ -142,6 +142,6 @@ final class StrictReturnNewAnalyzer if (!\is_string($variableName)) { return null; } - return new AssignToVariable($assignedVar, $variableName, $assign->expr); + return new AssignToVariable($variableName, $assign->expr); } } diff --git a/rules/TypeDeclaration/Rector/Param/ParamTypeFromStrictTypedPropertyRector.php b/rules/TypeDeclaration/Rector/Param/ParamTypeFromStrictTypedPropertyRector.php index c05e2fe27ed..ef4e85918b3 100644 --- a/rules/TypeDeclaration/Rector/Param/ParamTypeFromStrictTypedPropertyRector.php +++ b/rules/TypeDeclaration/Rector/Param/ParamTypeFromStrictTypedPropertyRector.php @@ -90,7 +90,11 @@ CODE_SAMPLE } return $this->decorateParamWithType($parentNode, $node); } - public function decorateParamWithType(ClassMethod $classMethod, Param $param) : ?Param + public function provideMinPhpVersion() : int + { + return PhpVersionFeature::TYPED_PROPERTIES; + } + private function decorateParamWithType(ClassMethod $classMethod, Param $param) : ?Param { if ($param->type !== null) { return null; @@ -121,10 +125,6 @@ CODE_SAMPLE } return null; } - public function provideMinPhpVersion() : int - { - return PhpVersionFeature::TYPED_PROPERTIES; - } /** * @return Identifier|Name|ComplexType|null */ diff --git a/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictGetterMethodReturnTypeRector.php b/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictGetterMethodReturnTypeRector.php index fc3a0fccb95..7d36be54691 100644 --- a/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictGetterMethodReturnTypeRector.php +++ b/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictGetterMethodReturnTypeRector.php @@ -17,12 +17,13 @@ use Rector\DeadCode\PhpDoc\TagRemover\VarTagRemover; use Rector\PHPStanStaticTypeMapper\Enum\TypeKind; use Rector\Privatization\Guard\ParentPropertyLookupGuard; use Rector\TypeDeclaration\TypeInferer\PropertyTypeInferer\GetterTypeDeclarationPropertyTypeInferer; +use Rector\VersionBonding\Contract\MinPhpVersionInterface; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** * @see \Rector\Tests\TypeDeclaration\Rector\Property\TypedPropertyFromStrictGetterMethodReturnTypeRector\TypedPropertyFromStrictGetterMethodReturnTypeRectorTest */ -final class TypedPropertyFromStrictGetterMethodReturnTypeRector extends AbstractRector +final class TypedPropertyFromStrictGetterMethodReturnTypeRector extends AbstractRector implements MinPhpVersionInterface { /** * @readonly diff --git a/rules/TypeDeclaration/TypeInferer/ReturnTypeInferer.php b/rules/TypeDeclaration/TypeInferer/ReturnTypeInferer.php index 3a69d7de3e9..669e100684a 100644 --- a/rules/TypeDeclaration/TypeInferer/ReturnTypeInferer.php +++ b/rules/TypeDeclaration/TypeInferer/ReturnTypeInferer.php @@ -111,14 +111,11 @@ final class ReturnTypeInferer return new MixedType(); } $type = $this->verifyThisType($type, $functionLike); - if (!$type instanceof Type) { - return new MixedType(); - } // normalize ConstStringType to ClassStringType $resolvedType = $this->genericClassStringTypeNormalizer->normalize($type); return $this->resolveTypeWithVoidHandling($functionLike, $resolvedType); } - public function verifyStaticType(Type $type, bool $isSupportedStaticReturnType) : ?Type + private function verifyStaticType(Type $type, bool $isSupportedStaticReturnType) : ?Type { if ($this->isStaticType($type)) { /** @var TypeWithClassName $type */ @@ -129,7 +126,7 @@ final class ReturnTypeInferer } return $type; } - public function verifyThisType(Type $type, FunctionLike $functionLike) : ?Type + private function verifyThisType(Type $type, FunctionLike $functionLike) : Type { if (!$type instanceof ThisType) { return $type; diff --git a/rules/TypeDeclaration/TypeNormalizer.php b/rules/TypeDeclaration/TypeNormalizer.php index a7134706cf7..2791c9fa31a 100644 --- a/rules/TypeDeclaration/TypeNormalizer.php +++ b/rules/TypeDeclaration/TypeNormalizer.php @@ -5,11 +5,8 @@ namespace Rector\TypeDeclaration; use PHPStan\Type\ArrayType; use PHPStan\Type\Constant\ConstantArrayType; -use PHPStan\Type\Constant\ConstantStringType; use PHPStan\Type\MixedType; use PHPStan\Type\NeverType; -use PHPStan\Type\ObjectType; -use PHPStan\Type\StringType; use PHPStan\Type\Type; use PHPStan\Type\TypeTraverser; use PHPStan\Type\UnionType; @@ -40,27 +37,6 @@ final class TypeNormalizer $this->typeFactory = $typeFactory; $this->privatesAccessor = $privatesAccessor; } - public function convertConstantArrayTypeToArrayType(ConstantArrayType $constantArrayType) : ?ArrayType - { - $nonConstantValueTypes = []; - if ($constantArrayType->getItemType() instanceof UnionType) { - /** @var UnionType $unionType */ - $unionType = $constantArrayType->getItemType(); - foreach ($unionType->getTypes() as $unionedType) { - if ($unionedType instanceof ConstantStringType) { - $stringType = new StringType(); - $nonConstantValueTypes[\get_class($stringType)] = $stringType; - } elseif ($unionedType instanceof ObjectType) { - $nonConstantValueTypes[] = $unionedType; - } else { - return null; - } - } - } else { - return null; - } - return $this->createArrayTypeFromNonConstantValueTypes($nonConstantValueTypes); - } /** * @api * @@ -150,19 +126,6 @@ final class TypeNormalizer { return $countTraversedTypes === 2 && ($this->isArrayNeverType($traversedTypeTypes[0]) || $this->isArrayNeverType($traversedTypeTypes[1])); } - /** - * @param array $nonConstantValueTypes - */ - private function createArrayTypeFromNonConstantValueTypes(array $nonConstantValueTypes) : ArrayType - { - $nonConstantValueTypes = \array_values($nonConstantValueTypes); - if (\count($nonConstantValueTypes) > 1) { - $nonConstantValueType = new UnionType($nonConstantValueTypes); - } else { - $nonConstantValueType = $nonConstantValueTypes[0]; - } - return new ArrayType(new MixedType(), $nonConstantValueType); - } private function collectNestedArrayTypeFromUnionType(UnionType $unionType, int $arrayNesting) : void { foreach ($unionType->getTypes() as $unionedType) { diff --git a/rules/TypeDeclaration/ValueObject/AddReturnTypeDeclaration.php b/rules/TypeDeclaration/ValueObject/AddReturnTypeDeclaration.php index 157264cc95c..a78939cc092 100644 --- a/rules/TypeDeclaration/ValueObject/AddReturnTypeDeclaration.php +++ b/rules/TypeDeclaration/ValueObject/AddReturnTypeDeclaration.php @@ -6,6 +6,9 @@ namespace Rector\TypeDeclaration\ValueObject; use PHPStan\Type\ObjectType; use PHPStan\Type\Type; use Rector\Core\Validation\RectorAssert; +/** + * @api + */ final class AddReturnTypeDeclaration { /** diff --git a/rules/TypeDeclaration/ValueObject/AssignToVariable.php b/rules/TypeDeclaration/ValueObject/AssignToVariable.php index 76718076597..7b0f7156760 100644 --- a/rules/TypeDeclaration/ValueObject/AssignToVariable.php +++ b/rules/TypeDeclaration/ValueObject/AssignToVariable.php @@ -4,14 +4,8 @@ declare (strict_types=1); namespace Rector\TypeDeclaration\ValueObject; use PhpParser\Node\Expr; -use PhpParser\Node\Expr\Variable; final class AssignToVariable { - /** - * @readonly - * @var \PhpParser\Node\Expr\Variable - */ - private $variable; /** * @readonly * @var string @@ -22,16 +16,11 @@ final class AssignToVariable * @var \PhpParser\Node\Expr */ private $assignedExpr; - public function __construct(Variable $variable, string $variableName, Expr $assignedExpr) + public function __construct(string $variableName, Expr $assignedExpr) { - $this->variable = $variable; $this->variableName = $variableName; $this->assignedExpr = $assignedExpr; } - public function getVariable() : Variable - { - return $this->variable; - } public function getVariableName() : string { return $this->variableName; diff --git a/src/Application/ApplicationFileProcessor.php b/src/Application/ApplicationFileProcessor.php index 7fac846a62f..715d4fd5f0d 100644 --- a/src/Application/ApplicationFileProcessor.php +++ b/src/Application/ApplicationFileProcessor.php @@ -138,7 +138,7 @@ final class ApplicationFileProcessor return $systemErrorsAndFileDiffs; } /** - * @internal Use only for tests + * @api use only for tests * * @param File[] $files * @return array{system_errors: SystemError[], file_diffs: FileDiff[]} diff --git a/src/Application/FileSystem/RemovedAndAddedFilesCollector.php b/src/Application/FileSystem/RemovedAndAddedFilesCollector.php index bceb540b498..29180baa92b 100644 --- a/src/Application/FileSystem/RemovedAndAddedFilesCollector.php +++ b/src/Application/FileSystem/RemovedAndAddedFilesCollector.php @@ -87,7 +87,7 @@ final class RemovedAndAddedFilesCollector return \count($this->removedFilePaths); } /** - * For testing + * @api For testing */ public function reset() : void { diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index c7c49f3c35f..74fe5698ba7 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -6,6 +6,8 @@ namespace Rector\Core\Application; use DateTime; use Rector\Core\Exception\VersionException; /** + * @api + * * Inspired by https://github.com/composer/composer/blob/master/src/Composer/Composer.php * See https://github.com/composer/composer/blob/6587715d0f8cae0cd39073b3bc5f018d0e6b84fe/src/Composer/Compiler.php#L208 * @@ -17,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = '88629427917b7d359beeb1a0b34d39d2127472b9'; + public const PACKAGE_VERSION = 'bfa1891c50677b01136a9308fd3c3ecc12e267d9'; /** * @api * @var string */ - public const RELEASE_DATE = '2022-12-23 09:40:11'; + public const RELEASE_DATE = '2022-12-23 18:06:25'; /** * @var int */ diff --git a/src/Bootstrap/ExtensionConfigResolver.php b/src/Bootstrap/ExtensionConfigResolver.php index d112ce9146f..286d7d35a6d 100644 --- a/src/Bootstrap/ExtensionConfigResolver.php +++ b/src/Bootstrap/ExtensionConfigResolver.php @@ -8,6 +8,7 @@ use ReflectionClass; final class ExtensionConfigResolver { /** + * @api * @return string[] */ public function provide() : array diff --git a/src/Configuration/ConfigurationFactory.php b/src/Configuration/ConfigurationFactory.php index b048b4e77a5..126431c1566 100644 --- a/src/Configuration/ConfigurationFactory.php +++ b/src/Configuration/ConfigurationFactory.php @@ -26,6 +26,7 @@ final class ConfigurationFactory $this->rectorOutputStyle = $rectorOutputStyle; } /** + * @api used in tests * @param string[] $paths */ public function createForTests(array $paths) : Configuration diff --git a/src/Configuration/RectorConfigProvider.php b/src/Configuration/RectorConfigProvider.php index c694da37c96..d862081fe22 100644 --- a/src/Configuration/RectorConfigProvider.php +++ b/src/Configuration/RectorConfigProvider.php @@ -23,10 +23,16 @@ final class RectorConfigProvider { return $this->parameterProvider->provideBoolParameter(\Rector\Core\Configuration\Option::AUTO_IMPORT_NAMES); } + /** + * @api symfony + */ public function getSymfonyContainerPhp() : string { return $this->parameterProvider->provideStringParameter(\Rector\Core\Configuration\Option::SYMFONY_CONTAINER_PHP_PATH_PARAMETER); } + /** + * @api symfony + */ public function getSymfonyContainerXml() : string { return $this->parameterProvider->provideStringParameter(\Rector\Core\Configuration\Option::SYMFONY_CONTAINER_XML_PATH_PARAMETER); diff --git a/src/Configuration/ValueObjectInliner.php b/src/Configuration/ValueObjectInliner.php index 5d12ddf3c95..8973fc67201 100644 --- a/src/Configuration/ValueObjectInliner.php +++ b/src/Configuration/ValueObjectInliner.php @@ -24,7 +24,7 @@ final class ValueObjectInliner * @param ReflectionClass $reflectionClass * @return mixed[] */ - public static function resolveArgumentValues(ReflectionClass $reflectionClass, object $object) : array + private static function resolveArgumentValues(ReflectionClass $reflectionClass, object $object) : array { $argumentValues = []; $constructorReflectionMethod = $reflectionClass->getConstructor(); diff --git a/src/Console/Output/OutputFormatterCollector.php b/src/Console/Output/OutputFormatterCollector.php index 574014088c4..2a36e339b75 100644 --- a/src/Console/Output/OutputFormatterCollector.php +++ b/src/Console/Output/OutputFormatterCollector.php @@ -25,18 +25,12 @@ final class OutputFormatterCollector $this->ensureOutputFormatExists($name); return $this->outputFormatters[$name]; } - /** - * @return string[] - */ - public function getNames() : array - { - return \array_keys($this->outputFormatters); - } private function ensureOutputFormatExists(string $name) : void { if (isset($this->outputFormatters[$name])) { return; } - throw new InvalidConfigurationException(\sprintf('Output formatter "%s" was not found. Pick one of "%s".', $name, \implode('", "', $this->getNames()))); + $outputFormatterNames = \array_keys($this->outputFormatters); + throw new InvalidConfigurationException(\sprintf('Output formatter "%s" was not found. Pick one of "%s".', $name, \implode('", "', $outputFormatterNames))); } } diff --git a/src/Error/ExceptionCorrector.php b/src/Error/ExceptionCorrector.php index e2e2acfe404..468a2eb1858 100644 --- a/src/Error/ExceptionCorrector.php +++ b/src/Error/ExceptionCorrector.php @@ -4,25 +4,8 @@ declare (strict_types=1); namespace Rector\Core\Error; use PHPStan\AnalysedCodeException; -use Rector\Core\Contract\Rector\RectorInterface; -use Throwable; final class ExceptionCorrector { - public function matchRectorClass(Throwable $throwable) : ?string - { - if (!isset($throwable->getTrace()[0])) { - return null; - } - if (!isset($throwable->getTrace()[0]['class'])) { - return null; - } - /** @var string $class */ - $class = $throwable->getTrace()[0]['class']; - if (!\is_a($class, RectorInterface::class, \true)) { - return null; - } - return $class; - } public function getAutoloadExceptionMessageAndAddLocation(AnalysedCodeException $analysedCodeException) : string { return \sprintf('Analyze error: "%s". Include your files in "$rectorConfig->autoloadPaths([...]);" or "$rectorConfig->bootstrapFiles([...]);" in "rector.php" config.%sSee https://github.com/rectorphp/rector#configuration', $analysedCodeException->getMessage(), \PHP_EOL); diff --git a/src/Kernel/RectorKernel.php b/src/Kernel/RectorKernel.php index 71f98442fcb..4a03598ea33 100644 --- a/src/Kernel/RectorKernel.php +++ b/src/Kernel/RectorKernel.php @@ -29,6 +29,9 @@ final class RectorKernel { $this->configureCallValuesCollector = new ConfigureCallValuesCollector(); } + /** + * @api used in tests + */ public function create() : ContainerInterface { return $this->createFromConfigs([]); @@ -52,6 +55,9 @@ final class RectorKernel $this->container = $containerBuilder; return $containerBuilder; } + /** + * @api used in tests + */ public function getContainer() : ContainerInterface { if ($this->container === null) { diff --git a/src/NodeAnalyzer/CoalesceAnalyzer.php b/src/NodeAnalyzer/CoalesceAnalyzer.php index d6765ce0c7b..248b8d52c14 100644 --- a/src/NodeAnalyzer/CoalesceAnalyzer.php +++ b/src/NodeAnalyzer/CoalesceAnalyzer.php @@ -15,6 +15,9 @@ final class CoalesceAnalyzer * @var array> */ private const ISSETABLE_EXPR = [Variable::class, ArrayDimFetch::class, PropertyFetch::class, StaticPropertyFetch::class]; + /** + * @api downgrade + */ public function hasIssetableLeft(Coalesce $coalesce) : bool { $leftClass = \get_class($coalesce->left); diff --git a/src/NodeDecorator/NamespacedNameDecorator.php b/src/NodeDecorator/NamespacedNameDecorator.php index b89b226374d..5e03b1c596e 100644 --- a/src/NodeDecorator/NamespacedNameDecorator.php +++ b/src/NodeDecorator/NamespacedNameDecorator.php @@ -9,6 +9,7 @@ use PhpParser\NodeVisitor\NameResolver; final class NamespacedNameDecorator { /** + * @api downgrade * @param \PhpParser\Node|mixed[] $node */ public function decorate($node) : void diff --git a/src/NodeManipulator/ArrayManipulator.php b/src/NodeManipulator/ArrayManipulator.php index fe385b82606..00625e07e05 100644 --- a/src/NodeManipulator/ArrayManipulator.php +++ b/src/NodeManipulator/ArrayManipulator.php @@ -48,6 +48,9 @@ final class ArrayManipulator } return \false; } + /** + * @api symfony + */ public function addItemToArrayUnderKey(Array_ $array, ArrayItem $newArrayItem, string $key) : void { foreach ($array->items as $item) { @@ -64,6 +67,9 @@ final class ArrayManipulator } $array->items[] = new ArrayItem(new Array_([$newArrayItem]), new String_($key)); } + /** + * @api + */ public function findItemInInArrayByKeyAndUnset(Array_ $array, string $keyName) : ?ArrayItem { foreach ($array->items as $i => $item) { @@ -84,6 +90,9 @@ final class ArrayManipulator } return null; } + /** + * @api symfony + */ public function hasKeyName(ArrayItem $arrayItem, string $name) : bool { if (!$arrayItem->key instanceof String_) { diff --git a/src/NodeManipulator/AssignManipulator.php b/src/NodeManipulator/AssignManipulator.php index af7dd79802a..a1741fb454e 100644 --- a/src/NodeManipulator/AssignManipulator.php +++ b/src/NodeManipulator/AssignManipulator.php @@ -118,6 +118,7 @@ final class AssignManipulator return \false; } /** + * @api doctrine * @return array */ public function resolveAssignsToLocalPropertyFetches(FunctionLike $functionLike) : array diff --git a/src/NodeManipulator/ClassDependencyManipulator.php b/src/NodeManipulator/ClassDependencyManipulator.php index 00c0c209903..5b35d6a0e2c 100644 --- a/src/NodeManipulator/ClassDependencyManipulator.php +++ b/src/NodeManipulator/ClassDependencyManipulator.php @@ -113,6 +113,9 @@ final class ClassDependencyManipulator $this->addConstructorDependencyWithCustomAssign($class, $propertyMetadata->getName(), $propertyMetadata->getType(), $assign); } } + /** + * @api doctrine + */ public function addConstructorDependencyWithCustomAssign(Class_ $class, string $name, ?Type $type, Assign $assign) : void { /** @var ClassMethod|null $constructorMethod */ @@ -129,6 +132,7 @@ final class ClassDependencyManipulator $this->dependencyClassMethodDecorator->decorateConstructorWithParentDependencies($class, $constructorMethod, $scope); } /** + * @api doctrine * @param Stmt[] $stmts */ public function addStmtsToConstructorIfNotThereYet(Class_ $class, array $stmts) : void diff --git a/src/NodeManipulator/ClassInsertManipulator.php b/src/NodeManipulator/ClassInsertManipulator.php index 928d1b027d8..d0df5ae686a 100644 --- a/src/NodeManipulator/ClassInsertManipulator.php +++ b/src/NodeManipulator/ClassInsertManipulator.php @@ -57,6 +57,7 @@ final class ClassInsertManipulator $this->addAsFirstMethod($class, $classConst); } /** + * @api * @param Property[] $properties */ public function addPropertiesToClass(Class_ $class, array $properties) : void diff --git a/src/NodeManipulator/ClassManipulator.php b/src/NodeManipulator/ClassManipulator.php index b5f64255119..557262bb490 100644 --- a/src/NodeManipulator/ClassManipulator.php +++ b/src/NodeManipulator/ClassManipulator.php @@ -3,7 +3,6 @@ declare (strict_types=1); namespace Rector\Core\NodeManipulator; -use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\Stmt\Class_; use PHPStan\Reflection\ReflectionProvider; use PHPStan\Type\ObjectType; @@ -50,6 +49,9 @@ final class ClassManipulator } return \false; } + /** + * @api phpunit + */ public function hasTrait(Class_ $class, string $desiredTrait) : bool { foreach ($class->getTraitUses() as $traitUse) { @@ -62,16 +64,4 @@ final class ClassManipulator } return \false; } - public function replaceTrait(Class_ $class, string $oldTrait, string $newTrait) : void - { - foreach ($class->getTraitUses() as $traitUse) { - foreach ($traitUse->traits as $key => $traitTrait) { - if (!$this->nodeNameResolver->isName($traitTrait, $oldTrait)) { - continue; - } - $traitUse->traits[$key] = new FullyQualified($newTrait); - break; - } - } - } } diff --git a/src/NodeManipulator/ClassMethodManipulator.php b/src/NodeManipulator/ClassMethodManipulator.php index af230e06b59..c91db04b081 100644 --- a/src/NodeManipulator/ClassMethodManipulator.php +++ b/src/NodeManipulator/ClassMethodManipulator.php @@ -3,20 +3,13 @@ declare (strict_types=1); namespace Rector\Core\NodeManipulator; -use PhpParser\Node; -use PhpParser\Node\Expr\Variable; -use PhpParser\Node\Name\FullyQualified; -use PhpParser\Node\Param; use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassMethod; use PHPStan\Reflection\ClassReflection; -use PHPStan\Type\ObjectType; -use Rector\Core\Exception\ShouldNotHappenException; use Rector\Core\PhpParser\Node\BetterNodeFinder; use Rector\Core\Reflection\ReflectionResolver; use Rector\Core\ValueObject\MethodName; use Rector\NodeNameResolver\NodeNameResolver; -use Rector\NodeTypeResolver\NodeTypeResolver; final class ClassMethodManipulator { /** @@ -29,21 +22,15 @@ final class ClassMethodManipulator * @var \Rector\NodeNameResolver\NodeNameResolver */ private $nodeNameResolver; - /** - * @readonly - * @var \Rector\NodeTypeResolver\NodeTypeResolver - */ - private $nodeTypeResolver; /** * @readonly * @var \Rector\Core\Reflection\ReflectionResolver */ private $reflectionResolver; - public function __construct(BetterNodeFinder $betterNodeFinder, NodeNameResolver $nodeNameResolver, NodeTypeResolver $nodeTypeResolver, ReflectionResolver $reflectionResolver) + public function __construct(BetterNodeFinder $betterNodeFinder, NodeNameResolver $nodeNameResolver, ReflectionResolver $reflectionResolver) { $this->betterNodeFinder = $betterNodeFinder; $this->nodeNameResolver = $nodeNameResolver; - $this->nodeTypeResolver = $nodeTypeResolver; $this->reflectionResolver = $reflectionResolver; } public function isNamedConstructor(ClassMethod $classMethod) : bool @@ -85,39 +72,4 @@ final class ClassMethodManipulator } return \false; } - /** - * @param string[] $possibleNames - */ - public function addMethodParameterIfMissing(Node $node, ObjectType $objectType, array $possibleNames) : string - { - $classMethod = $this->betterNodeFinder->findParentType($node, ClassMethod::class); - if (!$classMethod instanceof ClassMethod) { - // or null? - throw new ShouldNotHappenException(); - } - foreach ($classMethod->params as $paramNode) { - if (!$this->nodeTypeResolver->isObjectType($paramNode, $objectType)) { - continue; - } - return $this->nodeNameResolver->getName($paramNode); - } - $paramName = $this->resolveName($classMethod, $possibleNames); - $classMethod->params[] = new Param(new Variable($paramName), null, new FullyQualified($objectType->getClassName())); - return $paramName; - } - /** - * @param string[] $possibleNames - */ - private function resolveName(ClassMethod $classMethod, array $possibleNames) : string - { - foreach ($possibleNames as $possibleName) { - foreach ($classMethod->params as $paramNode) { - if ($this->nodeNameResolver->isName($paramNode, $possibleName)) { - continue 2; - } - } - return $possibleName; - } - throw new ShouldNotHappenException(); - } } diff --git a/src/NodeManipulator/IfManipulator.php b/src/NodeManipulator/IfManipulator.php index bcfca505446..97dc83b9411 100644 --- a/src/NodeManipulator/IfManipulator.php +++ b/src/NodeManipulator/IfManipulator.php @@ -9,7 +9,6 @@ use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\BinaryOp\Identical; use PhpParser\Node\Expr\BinaryOp\NotIdentical; use PhpParser\Node\Expr\Exit_; -use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Stmt; use PhpParser\Node\Stmt\Foreach_; @@ -19,7 +18,6 @@ use Rector\Core\PhpParser\Comparing\NodeComparator; use Rector\Core\PhpParser\Node\BetterNodeFinder; use Rector\Core\PhpParser\Node\Value\ValueResolver; use Rector\EarlyReturn\NodeTransformer\ConditionInverter; -use Rector\NodeNameResolver\NodeNameResolver; final class IfManipulator { /** @@ -27,11 +25,6 @@ final class IfManipulator * @var \Rector\Core\PhpParser\Node\BetterNodeFinder */ private $betterNodeFinder; - /** - * @readonly - * @var \Rector\NodeNameResolver\NodeNameResolver - */ - private $nodeNameResolver; /** * @readonly * @var \Rector\Core\NodeManipulator\StmtsManipulator @@ -52,10 +45,9 @@ final class IfManipulator * @var \Rector\Core\PhpParser\Comparing\NodeComparator */ private $nodeComparator; - public function __construct(BetterNodeFinder $betterNodeFinder, NodeNameResolver $nodeNameResolver, \Rector\Core\NodeManipulator\StmtsManipulator $stmtsManipulator, ValueResolver $valueResolver, ConditionInverter $conditionInverter, NodeComparator $nodeComparator) + public function __construct(BetterNodeFinder $betterNodeFinder, \Rector\Core\NodeManipulator\StmtsManipulator $stmtsManipulator, ValueResolver $valueResolver, ConditionInverter $conditionInverter, NodeComparator $nodeComparator) { $this->betterNodeFinder = $betterNodeFinder; - $this->nodeNameResolver = $nodeNameResolver; $this->stmtsManipulator = $stmtsManipulator; $this->valueResolver = $valueResolver; $this->conditionInverter = $conditionInverter; @@ -159,22 +151,6 @@ final class IfManipulator } return $this->nodeComparator->areNodesEqual($desiredExpr, $lastElseStmt->var); } - /** - * Matches: - * if () { - * } else { - * } - */ - public function isIfOrIfElseWithFunctionCondition(If_ $if, string $functionName) : bool - { - if ((bool) $if->elseifs) { - return \false; - } - if (!$if->cond instanceof FuncCall) { - return \false; - } - return $this->nodeNameResolver->isName($if->cond, $functionName); - } /** * @return If_[] */ diff --git a/src/NodeManipulator/MethodCallManipulator.php b/src/NodeManipulator/MethodCallManipulator.php index b6d04aa68ba..c7900ba3d60 100644 --- a/src/NodeManipulator/MethodCallManipulator.php +++ b/src/NodeManipulator/MethodCallManipulator.php @@ -34,6 +34,7 @@ final class MethodCallManipulator $this->fluentChainMethodCallNodeAnalyzer = $fluentChainMethodCallNodeAnalyzer; } /** + * @api * @return string[] */ public function findMethodCallNamesOnVariable(Variable $variable) : array @@ -52,7 +53,7 @@ final class MethodCallManipulator /** * @return MethodCall[] */ - public function findMethodCallsOnVariable(Variable $variable) : array + private function findMethodCallsOnVariable(Variable $variable) : array { // get scope node, e.g. parent function call, method call or anonymous function $classMethod = $this->betterNodeFinder->findParentType($variable, ClassMethod::class); diff --git a/src/NodeManipulator/PropertyManipulator.php b/src/NodeManipulator/PropertyManipulator.php index 5c1e2a5c989..6632d6140c4 100644 --- a/src/NodeManipulator/PropertyManipulator.php +++ b/src/NodeManipulator/PropertyManipulator.php @@ -152,16 +152,6 @@ final class PropertyManipulator $this->propertyFetchAnalyzer = $propertyFetchAnalyzer; $this->multiInstanceofChecker = $multiInstanceofChecker; } - /** - * @param \PhpParser\Node\Stmt\Property|\PhpParser\Node\Param $propertyOrPromotedParam - */ - public function isAllowedReadOnly($propertyOrPromotedParam, PhpDocInfo $phpDocInfo) : bool - { - if ($phpDocInfo->hasByAnnotationClasses(self::ALLOWED_READONLY_ANNOTATION_CLASS_OR_ATTRIBUTES)) { - return \true; - } - return $this->phpAttributeAnalyzer->hasPhpAttributes($propertyOrPromotedParam, self::ALLOWED_READONLY_ANNOTATION_CLASS_OR_ATTRIBUTES); - } /** * @param \PhpParser\Node\Stmt\Property|\PhpParser\Node\Param $propertyOrPromotedParam */ @@ -275,6 +265,16 @@ final class PropertyManipulator } return \false; } + /** + * @param \PhpParser\Node\Stmt\Property|\PhpParser\Node\Param $propertyOrPromotedParam + */ + private function isAllowedReadOnly($propertyOrPromotedParam, PhpDocInfo $phpDocInfo) : bool + { + if ($phpDocInfo->hasByAnnotationClasses(self::ALLOWED_READONLY_ANNOTATION_CLASS_OR_ATTRIBUTES)) { + return \true; + } + return $this->phpAttributeAnalyzer->hasPhpAttributes($propertyOrPromotedParam, self::ALLOWED_READONLY_ANNOTATION_CLASS_OR_ATTRIBUTES); + } private function isPropertyAssignedOnlyInConstructor(Class_ $class, string $propertyName, ?ClassMethod $classMethod) : bool { if (!$classMethod instanceof ClassMethod) { diff --git a/src/Php/ReservedKeywordAnalyzer.php b/src/Php/ReservedKeywordAnalyzer.php index 9ba63f1a418..ddd9f24e498 100644 --- a/src/Php/ReservedKeywordAnalyzer.php +++ b/src/Php/ReservedKeywordAnalyzer.php @@ -5,11 +5,6 @@ namespace Rector\Core\Php; final class ReservedKeywordAnalyzer { - /** - * @see https://www.php.net/manual/en/reserved.keywords.php - * @var string[] - */ - private const RESERVED_KEYWORDS = ['__halt_compiler', 'abstract', 'and', 'array', 'as', 'break', 'callable', 'case', 'catch', 'class', 'clone', 'const', 'continue', 'declare', 'default', 'die', 'do', 'echo', 'else', 'elseif', 'empty', 'enddeclare', 'endfor', 'endforeach', 'endif', 'endswitch', 'endwhile', 'eval', 'exit', 'extends', 'final', 'finally', 'fn', 'for', 'foreach', 'function', 'global', 'goto', 'if', 'implements', 'include', 'include_once', 'instanceof', 'insteadof', 'interface', 'isset', 'list', 'match', 'namespace', 'new', 'or', 'print', 'private', 'protected', 'public', 'readonly', 'require', 'require_once', 'return', 'static', 'switch', 'throw', 'trait', 'try', 'unset', 'use', 'var', 'while', 'xor', 'yield', 'yield from']; /** * @var string[] */ @@ -18,9 +13,4 @@ final class ReservedKeywordAnalyzer { return \in_array($name, self::NATIVE_VARIABLE_NAMES, \true); } - public function isReserved(string $keyword) : bool - { - $keyword = \strtolower($keyword); - return \in_array($keyword, self::RESERVED_KEYWORDS, \true); - } } diff --git a/src/PhpParser/AstResolver.php b/src/PhpParser/AstResolver.php index a1f3a7fe74c..04d77130395 100644 --- a/src/PhpParser/AstResolver.php +++ b/src/PhpParser/AstResolver.php @@ -116,13 +116,6 @@ final class AstResolver $classReflection = $this->reflectionProvider->getClass($className); return $this->resolveClassFromClassReflection($classReflection); } - /** - * @return \PhpParser\Node\Stmt\Class_|\PhpParser\Node\Stmt\Trait_|\PhpParser\Node\Stmt\Interface_|\PhpParser\Node\Stmt\Enum_|null - */ - public function resolveClassFromObjectType(TypeWithClassName $typeWithClassName) - { - return $this->resolveClassFromName($typeWithClassName->getClassName()); - } public function resolveClassMethodFromMethodReflection(MethodReflection $methodReflection) : ?ClassMethod { $classReflection = $methodReflection->getDeclaringClass(); diff --git a/src/PhpParser/Node/BetterNodeFinder.php b/src/PhpParser/Node/BetterNodeFinder.php index 0c7de706e93..808e339d149 100644 --- a/src/PhpParser/Node/BetterNodeFinder.php +++ b/src/PhpParser/Node/BetterNodeFinder.php @@ -212,6 +212,7 @@ final class BetterNodeFinder return $this->nodeFinder->find($nodes, $filter); } /** + * @api symfony * @param Node[] $nodes * @return ClassLike|null */ @@ -254,6 +255,7 @@ final class BetterNodeFinder }); } /** + * @api symfony * @return Assign|null */ public function findPreviousAssignToExpr(Expr $expr) : ?Node diff --git a/src/PhpParser/Node/NamedVariableFactory.php b/src/PhpParser/Node/NamedVariableFactory.php index db94299a5d0..4188795e133 100644 --- a/src/PhpParser/Node/NamedVariableFactory.php +++ b/src/PhpParser/Node/NamedVariableFactory.php @@ -25,6 +25,9 @@ final class NamedVariableFactory $this->variableNaming = $variableNaming; $this->betterNodeFinder = $betterNodeFinder; } + /** + * @api downgrade + */ public function createVariable(Node $node, string $variableName) : Variable { $currentStmt = $this->betterNodeFinder->resolveCurrentStatement($node); diff --git a/src/PhpParser/Node/NodeFactory.php b/src/PhpParser/Node/NodeFactory.php index 635450938b5..ec6a2af6d8b 100644 --- a/src/PhpParser/Node/NodeFactory.php +++ b/src/PhpParser/Node/NodeFactory.php @@ -35,8 +35,6 @@ use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Property; -use PhpParser\Node\Stmt\Use_; -use PhpParser\Node\Stmt\UseUse; use PHPStan\PhpDocParser\Ast\PhpDoc\GenericTagValueNode; use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode; use PHPStan\Type\Type; @@ -93,15 +91,6 @@ final class NodeFactory $this->currentNodeProvider = $currentNodeProvider; $this->propertyTypeDecorator = $propertyTypeDecorator; } - /** - * Creates "SomeClass::CONSTANT" - * @deprecated - */ - public function createShortClassConstFetch(string $shortClassName, string $constantName) : ClassConstFetch - { - $name = new Name($shortClassName); - return $this->createClassConstFetchFromName($name, $constantName); - } /** * @param string|ObjectReference::* $className * Creates "\SomeClass::CONSTANT" @@ -205,6 +194,7 @@ final class NodeFactory return $property; } /** + * @api symfony * @param mixed[] $arguments */ public function createLocalMethodCall(string $method, array $arguments = []) : MethodCall @@ -236,6 +226,9 @@ final class NodeFactory { return new StaticCall(new Name(ObjectReference::PARENT), new Identifier(MethodName::CONSTRUCT), $this->createArgsFromParams($params)); } + /** + * @api doctrine + */ public function createPrivateProperty(string $name) : Property { $propertyBuilder = new PropertyBuilder($name); @@ -261,19 +254,6 @@ final class NodeFactory } return $previousConcat; } - /** - * @param string[] $names - * @return Use_[] - */ - public function createUsesFromNames(array $names) : array - { - $uses = []; - foreach ($names as $name) { - $useUse = new UseUse(new Name($name)); - $uses[] = new Use_([$useUse]); - } - return $uses; - } /** * @param string|ObjectReference::* $class * @param Node[] $args @@ -337,6 +317,7 @@ final class NodeFactory return new ConstFetch(new Name('true')); } /** + * @api phpunit * @param string|ObjectReference::* $constantName */ public function createClassConstFetchFromName(Name $className, string $constantName) : ClassConstFetch diff --git a/src/PhpParser/Node/Value/ValueResolver.php b/src/PhpParser/Node/Value/ValueResolver.php index 81468f5d55a..4a2e415b062 100644 --- a/src/PhpParser/Node/Value/ValueResolver.php +++ b/src/PhpParser/Node/Value/ValueResolver.php @@ -120,6 +120,7 @@ final class ValueResolver return null; } /** + * @api downgrade symfony * @param mixed[] $expectedValues */ public function isValues(Expr $expr, array $expectedValues) : bool diff --git a/src/PhpParser/NodeTransformer.php b/src/PhpParser/NodeTransformer.php index 3db30770e9e..6317a64a810 100644 --- a/src/PhpParser/NodeTransformer.php +++ b/src/PhpParser/NodeTransformer.php @@ -25,6 +25,8 @@ final class NodeTransformer */ private const PERCENT_TEXT_REGEX = '#^%\\w$#'; /** + * @api symfony + * * From: * - sprintf("Hi %s", $name); * @@ -71,6 +73,9 @@ final class NodeTransformer } return $yieldNodes; } + /** + * @api symfony + */ public function transformConcatToStringArray(Concat $concat) : Array_ { $arrayItems = $this->transformConcatToItems($concat); diff --git a/src/PhpParser/Parser/SimplePhpParser.php b/src/PhpParser/Parser/SimplePhpParser.php index 27cd04259d2..9bd0521b2ca 100644 --- a/src/PhpParser/Parser/SimplePhpParser.php +++ b/src/PhpParser/Parser/SimplePhpParser.php @@ -22,6 +22,7 @@ final class SimplePhpParser $this->phpParser = $parserFactory->create(ParserFactory::PREFER_PHP7); } /** + * @api tests * @return Stmt[] */ public function parseFile(string $filePath) : array diff --git a/src/PhpParser/Printer/BetterStandardPrinter.php b/src/PhpParser/Printer/BetterStandardPrinter.php index 1e7aa9e2372..6746ffd3f5f 100644 --- a/src/PhpParser/Printer/BetterStandardPrinter.php +++ b/src/PhpParser/Printer/BetterStandardPrinter.php @@ -133,6 +133,9 @@ final class BetterStandardPrinter extends Standard implements NodePrinterInterfa $stmts = \array_values($stmts); return parent::prettyPrintFile($stmts) . \PHP_EOL; } + /** + * @api magic method in parent + */ public function pFileWithoutNamespace(FileWithoutNamespace $fileWithoutNamespace) : string { $content = $this->pStmts($fileWithoutNamespace->stmts, \false); diff --git a/src/PhpParser/Printer/FormatPerservingPrinter.php b/src/PhpParser/Printer/FormatPerservingPrinter.php index 65f793ac282..2d296c11ce5 100644 --- a/src/PhpParser/Printer/FormatPerservingPrinter.php +++ b/src/PhpParser/Printer/FormatPerservingPrinter.php @@ -30,6 +30,8 @@ final class FormatPerservingPrinter $this->filesystem = $filesystem; } /** + * @api tests + * * @param Node[] $newStmts * @param Node[] $oldStmts * @param Node[] $oldTokens diff --git a/src/Reporting/MissingRectorRulesReporter.php b/src/Reporting/MissingRectorRulesReporter.php index 14ae38869bd..dfef5cf20e5 100644 --- a/src/Reporting/MissingRectorRulesReporter.php +++ b/src/Reporting/MissingRectorRulesReporter.php @@ -30,20 +30,9 @@ final class MissingRectorRulesReporter } public function reportIfMissing() : ?int { - $activeRectors = \array_filter($this->rectors, static function (RectorInterface $rector) : bool { - if ($rector instanceof PostRectorInterface) { - return \false; - } - return !$rector instanceof ComplementaryRectorInterface; - }); - if ($activeRectors !== []) { + if ($this->filterActiveRectors($this->rectors) !== []) { return null; } - $this->report(); - return Command::FAILURE; - } - public function report() : void - { $this->rectorOutputStyle->warning('We could not find any Rector rules to run. You have 2 options to add them:'); $this->rectorOutputStyle->title('1. Add single rule to "rector.php"'); $this->rectorOutputStyle->writeln(' $rectorConfig->rule(...);'); @@ -54,5 +43,19 @@ final class MissingRectorRulesReporter $this->rectorOutputStyle->title('Missing "rector.php" in your project? Let Rector create it for you'); $this->rectorOutputStyle->writeln(' vendor/bin/rector init'); $this->rectorOutputStyle->newLine(); + return Command::FAILURE; + } + /** + * @param RectorInterface[] $rectors + * @return RectorInterface[] + */ + private function filterActiveRectors(array $rectors) : array + { + return \array_filter($rectors, static function (RectorInterface $rector) : bool { + if ($rector instanceof PostRectorInterface) { + return \false; + } + return !$rector instanceof ComplementaryRectorInterface; + }); } } diff --git a/src/Util/ArrayParametersMerger.php b/src/Util/ArrayParametersMerger.php index 9d92bed75b1..cd181b98cee 100644 --- a/src/Util/ArrayParametersMerger.php +++ b/src/Util/ArrayParametersMerger.php @@ -29,29 +29,6 @@ final class ArrayParametersMerger } return $right; } - /** - * The same as above, just with the case if both values being non-array, it will combined them to array: - * - * $this->mergeWithCombine(1, 2); // [1, 2] - * @param mixed $left - * @param mixed $right - * @return mixed - */ - public function mergeWithCombine($left, $right) - { - if (\is_array($left) && \is_array($right)) { - return $this->mergeLeftToRightWithCallable($left, $right, function ($leftValue, $rightValue) { - return $this->mergeWithCombine($leftValue, $rightValue); - }); - } - if ($left === null && \is_array($right)) { - return $right; - } - if (!empty($right) && (array) $left !== (array) $right) { - return $this->mergeWithCombine((array) $right, (array) $left); - } - return $left; - } /** * @param array $left * @param array $right diff --git a/src/Util/Reflection/PrivatesAccessor.php b/src/Util/Reflection/PrivatesAccessor.php index 498575d7cfb..f75fd8d781f 100644 --- a/src/Util/Reflection/PrivatesAccessor.php +++ b/src/Util/Reflection/PrivatesAccessor.php @@ -25,23 +25,8 @@ final class PrivatesAccessor $reflectionClass = new ReflectionClass($object); $object = $reflectionClass->newInstanceWithoutConstructor(); } - $methodReflection = $this->createAccessibleMethodReflection($object, $methodName); - return $methodReflection->invokeArgs($object, $arguments); - } - /** - * @param object|class-string $object - * @param mixed $argument - * @return mixed - */ - public function callPrivateMethodWithReference($object, string $methodName, $argument) - { - if (\is_string($object)) { - $reflectionClass = new ReflectionClass($object); - $object = $reflectionClass->newInstanceWithoutConstructor(); - } - $methodReflection = $this->createAccessibleMethodReflection($object, $methodName); - $methodReflection->invokeArgs($object, [&$argument]); - return $argument; + $reflectionMethod = $this->createAccessibleMethodReflection($object, $methodName); + return $reflectionMethod->invokeArgs($object, $arguments); } /** * @template T of object diff --git a/src/Validation/RectorAssert.php b/src/Validation/RectorAssert.php index fa86fd9790f..5535b65f990 100644 --- a/src/Validation/RectorAssert.php +++ b/src/Validation/RectorAssert.php @@ -73,6 +73,9 @@ final class RectorAssert { self::elementName($name, self::FUNCTION_NAME_REGEX, 'function'); } + /** + * @api + */ public static function elementName(string $name, string $regex, string $elementType) : void { if (StringUtils::isMatch($name, $regex)) { diff --git a/src/ValueObject/Application/File.php b/src/ValueObject/Application/File.php index 1f64a6a0a5c..0845ac98d5d 100644 --- a/src/ValueObject/Application/File.php +++ b/src/ValueObject/Application/File.php @@ -72,10 +72,6 @@ final class File $this->fileContent = $newFileContent; $this->hasChanged = \true; } - public function hasContentChanged() : bool - { - return $this->fileContent !== $this->originalFileContent; - } public function getOriginalFileContent() : string { return $this->originalFileContent; diff --git a/src/ValueObject/Error/SystemError.php b/src/ValueObject/Error/SystemError.php index 99b6872640b..2d3a1fafda5 100644 --- a/src/ValueObject/Error/SystemError.php +++ b/src/ValueObject/Error/SystemError.php @@ -46,10 +46,6 @@ final class SystemError implements SerializableInterface { return $this->line; } - public function getFileWithLine() : string - { - return $this->relativeFilePath . ':' . $this->line; - } public function getRelativeFilePath() : ?string { return $this->relativeFilePath; diff --git a/vendor/autoload.php b/vendor/autoload.php index 60423b694cd..f03c4629894 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 ComposerAutoloaderInit5727a5b552fffbd0bdf6eb3ddaeb80e1::getLoader(); +return ComposerAutoloaderInit1ca47d59cbeda8a04e9c4a89331c80bf::getLoader(); diff --git a/vendor/clue/ndjson-react/CHANGELOG.md b/vendor/clue/ndjson-react/CHANGELOG.md index 35b3e4aaa31..bc4faf69393 100644 --- a/vendor/clue/ndjson-react/CHANGELOG.md +++ b/vendor/clue/ndjson-react/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 1.3.0 (2022-12-23) + +* Feature: Add support for PHP 8.1 and PHP 8.2. + (#31 by @clue and #30 by @SimonFring) + +* Feature: Check type of incoming `data` before trying to decode NDJSON. + (#29 by @SimonFrings) + +* Improve documentation and examples and update to new [default loop](https://reactphp.org/event-loop/#loop). + (#26 by @clue, #27 by @SimonFrings and #25 by @PaulRotmann) + +* Improve test suite, report failed assertions and ensure 100% code coverage. + (#32 and #33 by @clue and #28 by @SimonFrings) + ## 1.2.0 (2020-12-09) * Improve test suite and add `.gitattributes` to exclude dev files from exports. diff --git a/vendor/clue/ndjson-react/README.md b/vendor/clue/ndjson-react/README.md index 2610494bc66..0ca4eabe1e8 100644 --- a/vendor/clue/ndjson-react/README.md +++ b/vendor/clue/ndjson-react/README.md @@ -1,6 +1,8 @@ # clue/reactphp-ndjson -[![CI status](https://github.com/clue/reactphp-ndjson/workflows/CI/badge.svg)](https://github.com/clue/reactphp-ndjson/actions) +[![CI status](https://github.com/clue/reactphp-ndjson/actions/workflows/ci.yml/badge.svg)](https://github.com/clue/reactphp-ndjson/actions) +[![installs on Packagist](https://img.shields.io/packagist/dt/clue/ndjson-react?color=blue&label=installs%20on%20Packagist)](https://packagist.org/packages/clue/ndjson-react) +[![code coverage](https://img.shields.io/badge/code%20coverage-100%25-success)](#tests) Streaming newline-delimited JSON ([NDJSON](http://ndjson.org/)) parser and encoder for [ReactPHP](https://reactphp.org/). @@ -9,7 +11,7 @@ file to store any kind of (uniform) structured data, such as a list of user objects or log entries. It uses a simple newline character between each individual record and as such can be both used for efficient persistence and simple append-style operations. This also allows it to be used in a streaming -context, such as a simple inter-process commmunication (IPC) protocol or for a +context, such as a simple inter-process communication (IPC) protocol or for a remote procedure call (RPC) mechanism. This library provides a simple streaming API to process very large NDJSON files with thousands or even millions of rows efficiently without having to load the whole file into memory at once. @@ -38,7 +40,7 @@ of rows efficiently without having to load the whole file into memory at once. ## Support us -We invest a lot of time developing, maintaining and updating our awesome +We invest a lot of time developing, maintaining, and updating our awesome open-source projects. You can help us sustain this high-quality of our work by [becoming a sponsor on GitHub](https://github.com/sponsors/clue). Sponsors get numerous benefits in return, see our [sponsoring page](https://github.com/sponsors/clue) @@ -74,7 +76,7 @@ no "outer array" to be modified). This makes it a perfect fit for a streaming context, for line-oriented CLI tools (such as `grep` and others) or for a logging context where you want to append records at a later time. Additionally, this also allows it to be used in a streaming context, such as a simple inter-process -commmunication (IPC) protocol or for a remote procedure call (RPC) mechanism. +communication (IPC) protocol or for a remote procedure call (RPC) mechanism. The newline character at the end of each line allows for some really simple *framing* (detecting individual records). While each individual line is valid @@ -133,12 +135,12 @@ as parsed values instead of just chunks of strings: ``` ```php -$stdin = new ReadableResourceStream(STDIN, $loop); +$stdin = new React\Stream\ReadableResourceStream(STDIN); -$stream = new Decoder($stdin); +$ndjson = new Clue\React\NDJson\Decoder($stdin); -$stream->on('data', function ($data) { - // data is a parsed element from the JSON stream +$ndjson->on('data', function ($data) { + // $data is a parsed element from the JSON stream // line 1: $data = (object)array('name' => 'test', 'active' => true); // line 2: $data = (object)array('name' => 'hello wörld', 'active' => true); var_dump($data); @@ -156,9 +158,9 @@ This means that, by default, JSON objects will be emitted as a `stdClass`. This behavior can be controlled through the optional constructor parameters: ```php -$stream = new Decoder($stdin, true); +$ndjson = new Clue\React\NDJson\Decoder($stdin, true); -$stream->on('data', function ($data) { +$ndjson->on('data', function ($data) { // JSON objects will be emitted as assoc arrays now }); ``` @@ -170,7 +172,7 @@ unreasonably long lines. It accepts an additional argument if you want to change this from the default of 64 KiB: ```php -$stream = new Decoder($stdin, false, 512, 0, 64 * 1024); +$ndjson = new Clue\React\NDJson\Decoder($stdin, false, 512, 0, 64 * 1024); ``` If the underlying stream emits an `error` event or the plain stream contains @@ -178,7 +180,7 @@ any data that does not represent a valid NDJson stream, it will emit an `error` event and then `close` the input stream: ```php -$stream->on('error', function (Exception $error) { +$ndjson->on('error', function (Exception $error) { // an error occured, stream will close next }); ``` @@ -189,7 +191,7 @@ followed by an `end` event on success or an `error` event for incomplete/invalid JSON data as above: ```php -$stream->on('end', function () { +$ndjson->on('end', function () { // stream successfully ended, stream will close next }); ``` @@ -198,7 +200,7 @@ If either the underlying stream or the `Decoder` is closed, it will forward the `close` event: ```php -$stream->on('close', function () { +$ndjson->on('close', function () { // stream closed // possibly after an "end" event or due to an "error" event }); @@ -208,7 +210,7 @@ The `close(): void` method can be used to explicitly close the `Decoder` and its underlying stream: ```php -$stream->close(); +$ndjson->close(); ``` The `pipe(WritableStreamInterface $dest, array $options = array(): WritableStreamInterface` @@ -217,7 +219,7 @@ Please note that the `Decoder` emits decoded/parsed data events, while many (most?) writable streams expect only data chunks: ```php -$stream->pipe($logger); +$ndjson->pipe($logger); ``` For more details, see ReactPHP's @@ -233,12 +235,12 @@ and accepts its data through the same interface, but handles any data as complet JSON elements instead of just chunks of strings: ```php -$stdout = new WritableResourceStream(STDOUT, $loop); +$stdout = new React\Stream\WritableResourceStream(STDOUT); -$stream = new Encoder($stdout); +$ndjson = new Clue\React\NDJson\Encoder($stdout); -$stream->write(array('name' => 'test', 'active' => true)); -$stream->write(array('name' => 'hello wörld', 'active' => true)); +$ndjson->write(array('name' => 'test', 'active' => true)); +$ndjson->write(array('name' => 'hello wörld', 'active' => true)); ``` ``` {"name":"test","active":true} @@ -247,13 +249,13 @@ $stream->write(array('name' => 'hello wörld', 'active' => true)); The `Encoder` supports the same parameters as the underlying [`json_encode()`](https://www.php.net/manual/en/function.json-encode.php) function. -This means that, by default, unicode characters will be escaped in the output. +This means that, by default, Unicode characters will be escaped in the output. This behavior can be controlled through the optional constructor parameters: ```php -$stream = new Encoder($stdout, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); +$ndjson = new Clue\React\NDJson\Encoder($stdout, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); -$stream->write('hello wörld'); +$ndjson->write('hello wörld'); ``` ``` "hello wörld" @@ -267,7 +269,7 @@ any data that can not be represented as a valid NDJSON stream, it will emit an `error` event and then `close` the input stream: ```php -$stream->on('error', function (Exception $error) { +$ndjson->on('error', function (Exception $error) { // an error occured, stream will close next }); ``` @@ -276,7 +278,7 @@ If either the underlying stream or the `Encoder` is closed, it will forward the `close` event: ```php -$stream->on('close', function () { +$ndjson->on('close', function () { // stream closed // possibly after an "end" event or due to an "error" event }); @@ -286,14 +288,14 @@ The `end(mixed $data = null): void` method can be used to optionally emit any final data and then soft-close the `Encoder` and its underlying stream: ```php -$stream->end(); +$ndjson->end(); ``` The `close(): void` method can be used to explicitly close the `Encoder` and its underlying stream: ```php -$stream->close(); +$ndjson->close(); ``` For more details, see ReactPHP's @@ -301,14 +303,14 @@ For more details, see ReactPHP's ## Install -The recommended way to install this library is [through Composer](https://getcomposer.org). +The recommended way to install this library is [through Composer](https://getcomposer.org/). [New to Composer?](https://getcomposer.org/doc/00-intro.md) This project follows [SemVer](https://semver.org/). This will install the latest supported version: ```bash -$ composer require clue/ndjson-react:^1.2 +composer require clue/ndjson-react:^1.3 ``` See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades. @@ -316,21 +318,21 @@ See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades. This project aims to run on any platform and thus does not require any PHP extensions and supports running on legacy PHP 5.3 through current PHP 8+ and HHVM. -It's *highly recommended to use PHP 7+* for this project. +It's *highly recommended to use the latest supported PHP version* for this project. ## Tests To run the test suite, you first need to clone this repo and then install all -dependencies [through Composer](https://getcomposer.org): +dependencies [through Composer](https://getcomposer.org/): ```bash -$ composer install +composer install ``` To run the test suite, go to the project root and run: ```bash -$ php vendor/bin/phpunit +vendor/bin/phpunit ``` ## License diff --git a/vendor/clue/ndjson-react/composer.json b/vendor/clue/ndjson-react/composer.json index ec7affef06a..497478ee6aa 100644 --- a/vendor/clue/ndjson-react/composer.json +++ b/vendor/clue/ndjson-react/composer.json @@ -17,6 +17,14 @@ "email": "christian@clue.engineering" } ], + "require": { + "php": ">=5.3", + "react\/stream": "^1.2" + }, + "require-dev": { + "phpunit\/phpunit": "^9.5 || ^5.7 || ^4.8.35", + "react\/event-loop": "^1.2" + }, "autoload": { "psr-4": { "RectorPrefix202212\\Clue\\React\\NDJson\\": "src\/" @@ -26,13 +34,5 @@ "psr-4": { "RectorPrefix202212\\Clue\\Tests\\React\\NDJson\\": "tests\/" } - }, - "require": { - "php": ">=5.3", - "react\/stream": "^1.0 || ^0.7 || ^0.6" - }, - "require-dev": { - "react\/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3", - "phpunit\/phpunit": "^9.3 || ^5.7 || ^4.8.35" } } \ No newline at end of file diff --git a/vendor/clue/ndjson-react/src/Decoder.php b/vendor/clue/ndjson-react/src/Decoder.php index b898dbd0614..cccd8e28bbd 100644 --- a/vendor/clue/ndjson-react/src/Decoder.php +++ b/vendor/clue/ndjson-react/src/Decoder.php @@ -82,6 +82,10 @@ class Decoder extends EventEmitter implements ReadableStreamInterface /** @internal */ public function handleData($data) { + if (!\is_string($data)) { + $this->handleError(new \UnexpectedValueException('Expected stream to emit string, but got ' . \gettype($data))); + return; + } $this->buffer .= $data; // keep parsing while a newline has been found while (($newline = \strpos($this->buffer, "\n")) !== \false && $newline <= $this->maxlength) { @@ -89,11 +93,14 @@ class Decoder extends EventEmitter implements ReadableStreamInterface $data = (string) \substr($this->buffer, 0, $newline); $this->buffer = (string) \substr($this->buffer, $newline + 1); // decode data with options given in ctor + // @codeCoverageIgnoreStart if ($this->options === 0) { $data = \json_decode($data, $this->assoc, $this->depth); } else { + \assert(\PHP_VERSION_ID >= 50400); $data = \json_decode($data, $this->assoc, $this->depth, $this->options); } + // @codeCoverageIgnoreEnd // abort stream if decoding failed if ($data === null && \json_last_error() !== \JSON_ERROR_NONE) { // @codeCoverageIgnoreStart diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index a53b8ecf485..f2cd07a541c 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -1608,7 +1608,6 @@ return array( 'Rector\\DeadCode\\ValueObject\\VariableAndPropertyFetchAssign' => $baseDir . '/rules/DeadCode/ValueObject/VariableAndPropertyFetchAssign.php', 'Rector\\DeadCode\\ValueObject\\VersionCompareCondition' => $baseDir . '/rules/DeadCode/ValueObject/VersionCompareCondition.php', 'Rector\\Defluent\\NodeAnalyzer\\FluentChainMethodCallNodeAnalyzer' => $baseDir . '/packages/Defluent/NodeAnalyzer/FluentChainMethodCallNodeAnalyzer.php', - 'Rector\\Defluent\\NodeAnalyzer\\SameClassMethodCallAnalyzer' => $baseDir . '/packages/Defluent/NodeAnalyzer/SameClassMethodCallAnalyzer.php', 'Rector\\DependencyInjection\\Collector\\VariablesToPropertyFetchCollection' => $baseDir . '/rules/DependencyInjection/Collector/VariablesToPropertyFetchCollection.php', 'Rector\\DependencyInjection\\NodeManipulator\\PropertyConstructorInjectionManipulator' => $baseDir . '/rules/DependencyInjection/NodeManipulator/PropertyConstructorInjectionManipulator.php', 'Rector\\DependencyInjection\\Rector\\ClassMethod\\AddMethodParentCallRector' => $baseDir . '/rules/DependencyInjection/Rector/ClassMethod/AddMethodParentCallRector.php', @@ -2380,7 +2379,6 @@ return array( 'Rector\\Removing\\Rector\\FuncCall\\RemoveFuncCallArgRector' => $baseDir . '/rules/Removing/Rector/FuncCall/RemoveFuncCallArgRector.php', 'Rector\\Removing\\ValueObject\\ArgumentRemover' => $baseDir . '/rules/Removing/ValueObject/ArgumentRemover.php', 'Rector\\Removing\\ValueObject\\RemoveFuncCallArg' => $baseDir . '/rules/Removing/ValueObject/RemoveFuncCallArg.php', - 'Rector\\Renaming\\Collector\\MethodCallRenameCollector' => $baseDir . '/rules/Renaming/Collector/MethodCallRenameCollector.php', 'Rector\\Renaming\\Contract\\MethodCallRenameInterface' => $baseDir . '/rules/Renaming/Contract/MethodCallRenameInterface.php', 'Rector\\Renaming\\Contract\\RenameAnnotationInterface' => $baseDir . '/rules/Renaming/Contract/RenameAnnotationInterface.php', 'Rector\\Renaming\\Contract\\RenameClassConstFetchInterface' => $baseDir . '/rules/Renaming/Contract/RenameClassConstFetchInterface.php', diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 1430378de40..3702a18f293 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit5727a5b552fffbd0bdf6eb3ddaeb80e1 +class ComposerAutoloaderInit1ca47d59cbeda8a04e9c4a89331c80bf { private static $loader; @@ -22,17 +22,17 @@ class ComposerAutoloaderInit5727a5b552fffbd0bdf6eb3ddaeb80e1 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit5727a5b552fffbd0bdf6eb3ddaeb80e1', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit1ca47d59cbeda8a04e9c4a89331c80bf', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit5727a5b552fffbd0bdf6eb3ddaeb80e1', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit1ca47d59cbeda8a04e9c4a89331c80bf', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit5727a5b552fffbd0bdf6eb3ddaeb80e1::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit1ca47d59cbeda8a04e9c4a89331c80bf::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInit5727a5b552fffbd0bdf6eb3ddaeb80e1::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInit1ca47d59cbeda8a04e9c4a89331c80bf::$files; $requireFile = 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 7233cd6a3a6..4eb4275b3ad 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit5727a5b552fffbd0bdf6eb3ddaeb80e1 +class ComposerStaticInit1ca47d59cbeda8a04e9c4a89331c80bf { public static $files = array ( 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', @@ -1853,7 +1853,6 @@ class ComposerStaticInit5727a5b552fffbd0bdf6eb3ddaeb80e1 'Rector\\DeadCode\\ValueObject\\VariableAndPropertyFetchAssign' => __DIR__ . '/../..' . '/rules/DeadCode/ValueObject/VariableAndPropertyFetchAssign.php', 'Rector\\DeadCode\\ValueObject\\VersionCompareCondition' => __DIR__ . '/../..' . '/rules/DeadCode/ValueObject/VersionCompareCondition.php', 'Rector\\Defluent\\NodeAnalyzer\\FluentChainMethodCallNodeAnalyzer' => __DIR__ . '/../..' . '/packages/Defluent/NodeAnalyzer/FluentChainMethodCallNodeAnalyzer.php', - 'Rector\\Defluent\\NodeAnalyzer\\SameClassMethodCallAnalyzer' => __DIR__ . '/../..' . '/packages/Defluent/NodeAnalyzer/SameClassMethodCallAnalyzer.php', 'Rector\\DependencyInjection\\Collector\\VariablesToPropertyFetchCollection' => __DIR__ . '/../..' . '/rules/DependencyInjection/Collector/VariablesToPropertyFetchCollection.php', 'Rector\\DependencyInjection\\NodeManipulator\\PropertyConstructorInjectionManipulator' => __DIR__ . '/../..' . '/rules/DependencyInjection/NodeManipulator/PropertyConstructorInjectionManipulator.php', 'Rector\\DependencyInjection\\Rector\\ClassMethod\\AddMethodParentCallRector' => __DIR__ . '/../..' . '/rules/DependencyInjection/Rector/ClassMethod/AddMethodParentCallRector.php', @@ -2625,7 +2624,6 @@ class ComposerStaticInit5727a5b552fffbd0bdf6eb3ddaeb80e1 'Rector\\Removing\\Rector\\FuncCall\\RemoveFuncCallArgRector' => __DIR__ . '/../..' . '/rules/Removing/Rector/FuncCall/RemoveFuncCallArgRector.php', 'Rector\\Removing\\ValueObject\\ArgumentRemover' => __DIR__ . '/../..' . '/rules/Removing/ValueObject/ArgumentRemover.php', 'Rector\\Removing\\ValueObject\\RemoveFuncCallArg' => __DIR__ . '/../..' . '/rules/Removing/ValueObject/RemoveFuncCallArg.php', - 'Rector\\Renaming\\Collector\\MethodCallRenameCollector' => __DIR__ . '/../..' . '/rules/Renaming/Collector/MethodCallRenameCollector.php', 'Rector\\Renaming\\Contract\\MethodCallRenameInterface' => __DIR__ . '/../..' . '/rules/Renaming/Contract/MethodCallRenameInterface.php', 'Rector\\Renaming\\Contract\\RenameAnnotationInterface' => __DIR__ . '/../..' . '/rules/Renaming/Contract/RenameAnnotationInterface.php', 'Rector\\Renaming\\Contract\\RenameClassConstFetchInterface' => __DIR__ . '/../..' . '/rules/Renaming/Contract/RenameClassConstFetchInterface.php', @@ -3063,9 +3061,9 @@ class ComposerStaticInit5727a5b552fffbd0bdf6eb3ddaeb80e1 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit5727a5b552fffbd0bdf6eb3ddaeb80e1::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit5727a5b552fffbd0bdf6eb3ddaeb80e1::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit5727a5b552fffbd0bdf6eb3ddaeb80e1::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit1ca47d59cbeda8a04e9c4a89331c80bf::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit1ca47d59cbeda8a04e9c4a89331c80bf::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit1ca47d59cbeda8a04e9c4a89331c80bf::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index d1fad920a84..1411b85e6e0 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -2,28 +2,28 @@ "packages": [ { "name": "clue\/ndjson-react", - "version": "v1.2.0", - "version_normalized": "1.2.0.0", + "version": "v1.3.0", + "version_normalized": "1.3.0.0", "source": { "type": "git", "url": "https:\/\/github.com\/clue\/reactphp-ndjson.git", - "reference": "708411c7e45ac85371a99d50f52284971494bede" + "reference": "392dc165fce93b5bb5c637b67e59619223c931b0" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/clue\/reactphp-ndjson\/zipball\/708411c7e45ac85371a99d50f52284971494bede", - "reference": "708411c7e45ac85371a99d50f52284971494bede", + "url": "https:\/\/api.github.com\/repos\/clue\/reactphp-ndjson\/zipball\/392dc165fce93b5bb5c637b67e59619223c931b0", + "reference": "392dc165fce93b5bb5c637b67e59619223c931b0", "shasum": "" }, "require": { "php": ">=5.3", - "react\/stream": "^1.0 || ^0.7 || ^0.6" + "react\/stream": "^1.2" }, "require-dev": { - "phpunit\/phpunit": "^9.3 || ^5.7 || ^4.8.35", - "react\/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3" + "phpunit\/phpunit": "^9.5 || ^5.7 || ^4.8.35", + "react\/event-loop": "^1.2" }, - "time": "2020-12-09T13:09:07+00:00", + "time": "2022-12-23T10:58:28+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -53,7 +53,7 @@ ], "support": { "issues": "https:\/\/github.com\/clue\/reactphp-ndjson\/issues", - "source": "https:\/\/github.com\/clue\/reactphp-ndjson\/tree\/v1.2.0" + "source": "https:\/\/github.com\/clue\/reactphp-ndjson\/tree\/v1.3.0" }, "funding": [ { @@ -1913,12 +1913,12 @@ "source": { "type": "git", "url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git", - "reference": "b1ca6d78c8dd17b7e5ba3599a5280b429656af75" + "reference": "6cf8d9dc726e3fcf577c1c166bfe2b9893623d48" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/b1ca6d78c8dd17b7e5ba3599a5280b429656af75", - "reference": "b1ca6d78c8dd17b7e5ba3599a5280b429656af75", + "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/6cf8d9dc726e3fcf577c1c166bfe2b9893623d48", + "reference": "6cf8d9dc726e3fcf577c1c166bfe2b9893623d48", "shasum": "" }, "require": { @@ -1944,7 +1944,7 @@ "symplify\/rule-doc-generator": "^11.1", "symplify\/vendor-patches": "^11.1" }, - "time": "2022-12-05T13:21:25+00:00", + "time": "2022-12-23T16:38:50+00:00", "default-branch": true, "type": "rector-extension", "extra": { @@ -3033,17 +3033,17 @@ }, { "name": "symplify\/easy-parallel", - "version": "11.1.21", - "version_normalized": "11.1.21.0", + "version": "11.1.24", + "version_normalized": "11.1.24.0", "source": { "type": "git", "url": "https:\/\/github.com\/symplify\/easy-parallel.git", - "reference": "464d9fdead366d6cf40db9d94660cdc3076708c8" + "reference": "1a4cb5a7e877257591d41a97384b18754a301e61" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/symplify\/easy-parallel\/zipball\/464d9fdead366d6cf40db9d94660cdc3076708c8", - "reference": "464d9fdead366d6cf40db9d94660cdc3076708c8", + "url": "https:\/\/api.github.com\/repos\/symplify\/easy-parallel\/zipball\/1a4cb5a7e877257591d41a97384b18754a301e61", + "reference": "1a4cb5a7e877257591d41a97384b18754a301e61", "shasum": "" }, "require": { @@ -3056,29 +3056,29 @@ "symfony\/console": "^6.2" }, "conflict": { - "symplify\/autowire-array-parameter": "<11.1.21", - "symplify\/coding-standard": "<11.1.21", - "symplify\/config-transformer": "<11.1.21", - "symplify\/easy-ci": "<11.1.21", - "symplify\/easy-coding-standard": "<11.1.21", - "symplify\/easy-testing": "<11.1.21", - "symplify\/monorepo-builder": "<11.1.21", - "symplify\/package-builder": "<11.1.21", - "symplify\/php-config-printer": "<11.1.21", - "symplify\/phpstan-extensions": "<11.1.21", - "symplify\/phpstan-rules": "<11.1.21", - "symplify\/rule-doc-generator": "<11.1.21", - "symplify\/rule-doc-generator-contracts": "<11.1.21", - "symplify\/smart-file-system": "<11.1.21", - "symplify\/symfony-static-dumper": "<11.1.21", - "symplify\/symplify-kernel": "<11.1.21", - "symplify\/vendor-patches": "<11.1.21" + "symplify\/autowire-array-parameter": "<11.1.24", + "symplify\/coding-standard": "<11.1.24", + "symplify\/config-transformer": "<11.1.24", + "symplify\/easy-ci": "<11.1.24", + "symplify\/easy-coding-standard": "<11.1.24", + "symplify\/easy-testing": "<11.1.24", + "symplify\/monorepo-builder": "<11.1.24", + "symplify\/package-builder": "<11.1.24", + "symplify\/php-config-printer": "<11.1.24", + "symplify\/phpstan-extensions": "<11.1.24", + "symplify\/phpstan-rules": "<11.1.24", + "symplify\/rule-doc-generator": "<11.1.24", + "symplify\/rule-doc-generator-contracts": "<11.1.24", + "symplify\/smart-file-system": "<11.1.24", + "symplify\/symfony-static-dumper": "<11.1.24", + "symplify\/symplify-kernel": "<11.1.24", + "symplify\/vendor-patches": "<11.1.24" }, "require-dev": { "phpunit\/phpunit": "^9.5.26", - "symplify\/package-builder": "^11.1.21" + "symplify\/package-builder": "^11.1.24" }, - "time": "2022-12-22T15:40:02+00:00", + "time": "2022-12-23T15:00:54+00:00", "type": "library", "extra": { "branch-alias": { @@ -3098,23 +3098,23 @@ "description": "Helper package for easier CLI project parallelization", "support": { "issues": "https:\/\/github.com\/symplify\/easy-parallel\/issues", - "source": "https:\/\/github.com\/symplify\/easy-parallel\/tree\/11.1.21" + "source": "https:\/\/github.com\/symplify\/easy-parallel\/tree\/11.1.24" }, "install-path": "..\/symplify\/easy-parallel" }, { "name": "symplify\/rule-doc-generator-contracts", - "version": "11.1.21", - "version_normalized": "11.1.21.0", + "version": "11.1.24", + "version_normalized": "11.1.24.0", "source": { "type": "git", "url": "https:\/\/github.com\/symplify\/rule-doc-generator-contracts.git", - "reference": "aa99ef1947e84850ea7a9b34ea7d7ce6f5780bc7" + "reference": "822896f06a0cdb8effbf5371459d8fffd24a4eab" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/symplify\/rule-doc-generator-contracts\/zipball\/aa99ef1947e84850ea7a9b34ea7d7ce6f5780bc7", - "reference": "aa99ef1947e84850ea7a9b34ea7d7ce6f5780bc7", + "url": "https:\/\/api.github.com\/repos\/symplify\/rule-doc-generator-contracts\/zipball\/822896f06a0cdb8effbf5371459d8fffd24a4eab", + "reference": "822896f06a0cdb8effbf5371459d8fffd24a4eab", "shasum": "" }, "require": { @@ -3122,25 +3122,25 @@ "php": ">=8.1" }, "conflict": { - "symplify\/autowire-array-parameter": "<11.1.21", - "symplify\/coding-standard": "<11.1.21", - "symplify\/config-transformer": "<11.1.21", - "symplify\/easy-ci": "<11.1.21", - "symplify\/easy-coding-standard": "<11.1.21", - "symplify\/easy-parallel": "<11.1.21", - "symplify\/easy-testing": "<11.1.21", - "symplify\/monorepo-builder": "<11.1.21", - "symplify\/package-builder": "<11.1.21", - "symplify\/php-config-printer": "<11.1.21", - "symplify\/phpstan-extensions": "<11.1.21", - "symplify\/phpstan-rules": "<11.1.21", - "symplify\/rule-doc-generator": "<11.1.21", - "symplify\/smart-file-system": "<11.1.21", - "symplify\/symfony-static-dumper": "<11.1.21", - "symplify\/symplify-kernel": "<11.1.21", - "symplify\/vendor-patches": "<11.1.21" + "symplify\/autowire-array-parameter": "<11.1.24", + "symplify\/coding-standard": "<11.1.24", + "symplify\/config-transformer": "<11.1.24", + "symplify\/easy-ci": "<11.1.24", + "symplify\/easy-coding-standard": "<11.1.24", + "symplify\/easy-parallel": "<11.1.24", + "symplify\/easy-testing": "<11.1.24", + "symplify\/monorepo-builder": "<11.1.24", + "symplify\/package-builder": "<11.1.24", + "symplify\/php-config-printer": "<11.1.24", + "symplify\/phpstan-extensions": "<11.1.24", + "symplify\/phpstan-rules": "<11.1.24", + "symplify\/rule-doc-generator": "<11.1.24", + "symplify\/smart-file-system": "<11.1.24", + "symplify\/symfony-static-dumper": "<11.1.24", + "symplify\/symplify-kernel": "<11.1.24", + "symplify\/vendor-patches": "<11.1.24" }, - "time": "2022-12-22T15:40:09+00:00", + "time": "2022-12-23T15:01:58+00:00", "type": "library", "extra": { "branch-alias": { @@ -3159,7 +3159,7 @@ ], "description": "Contracts for production code of RuleDocGenerator", "support": { - "source": "https:\/\/github.com\/symplify\/rule-doc-generator-contracts\/tree\/11.1.21" + "source": "https:\/\/github.com\/symplify\/rule-doc-generator-contracts\/tree\/11.1.24" }, "funding": [ { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 1413717d13d..ef18cc02d8e 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -2,4 +2,4 @@ namespace RectorPrefix202212; -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.14.x-dev'), 'dev' => \false), 'versions' => array('clue/ndjson-react' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => '708411c7e45ac85371a99d50f52284971494bede', '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.4.1', 'version' => '0.4.1.0', 'reference' => '79261cc280aded96d098e1b0e0ba0c4881b432c2', 'type' => 'library', 'install_path' => __DIR__ . '/../fidry/cpu-core-counter', 'aliases' => array(), 'dev_requirement' => \false), 'nette/utils' => array('pretty_version' => 'v3.2.8', 'version' => '3.2.8.0', 'reference' => '02a54c4c872b99e4ec05c4aec54b5a06eb0f6368', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.15.2', 'version' => '4.15.2.0', 'reference' => 'f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc', '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.15.3', 'version' => '1.15.3.0', 'reference' => '61800f71a5526081d1b5633766aa88341f1ade76', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan' => array('pretty_version' => '1.9.4', 'version' => '1.9.4.0', 'reference' => 'd03bccee595e2146b7c9d174486b84f4dc61b0f2', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan-phpunit' => array('pretty_version' => '1.3.3', 'version' => '1.3.3.0', 'reference' => '54a24bd23e9e80ee918cdc24f909d376c2e273f7', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../phpstan/phpstan-phpunit', '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.3.0', 'version' => '1.3.0.0', 'reference' => '187fb56f46d424afb6ec4ad089269c72eec2e137', 'type' => 'library', 'install_path' => __DIR__ . '/../react/event-loop', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise' => array('pretty_version' => 'v2.9.0', 'version' => '2.9.0.0', 'reference' => '234f8fd1023c9158e2314fa9d7d0e6a83db42910', '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.14.x-dev', 1 => 'dev-main')), 'rector/rector-doctrine' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'd5c39ae136f134e69af826d06628fd54c135ef6b', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-doctrine', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-downgrade-php' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'b1ca6d78c8dd17b7e5ba3599a5280b429656af75', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-downgrade-php', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-php-parser' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '9ea5f622c1ed47addb197ded25a6bac39c39c596', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-php-parser', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-phpunit' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'a236bc6345cdbeeb8d36e9524b432bdd32cc777a', '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.14.x-dev'), 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'b463377817b8d27fbf97c4d576bea9abf31b8261', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'sebastian/diff' => array('pretty_version' => '4.0.4', 'version' => '4.0.4.0', 'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/cache-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.0')), 'symfony/config' => array('pretty_version' => 'v6.2.0', 'version' => '6.2.0.0', 'reference' => 'ebf27792246165a2a0b6b69ec9c620cac8c5a2f0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v6.2.2', 'version' => '6.2.2.0', 'reference' => '5a9bd5c543f00157c55face973c149957467db31', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/contracts' => array('pretty_version' => 'v3.2.0', 'version' => '3.2.0.0', 'reference' => 'c47da22960a1eb5e39c1ad84120734e680265610', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/dependency-injection' => array('pretty_version' => 'v6.1.8', 'version' => '6.1.8.0', 'reference' => '11e33ed84db0ced77511a23b35168db127909f0e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.0')), 'symfony/event-dispatcher-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.0')), 'symfony/filesystem' => array('pretty_version' => 'v6.2.0', 'version' => '6.2.0.0', 'reference' => '50b2523c874605cf3d4acf7a9e2b30b6a440a016', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.2.0', 'version' => '6.2.0.0', 'reference' => 'eb2355f69519e4ef33f1835bca4c935f5d42e570', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/http-client-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.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/service-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.0')), 'symfony/service-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0|3.0')), 'symfony/string' => array('pretty_version' => 'v6.2.2', 'version' => '6.2.2.0', 'reference' => '863219fd713fa41cbcd285a79723f94672faff4d', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.0')), 'symplify/easy-parallel' => array('pretty_version' => '11.1.21', 'version' => '11.1.21.0', 'reference' => '464d9fdead366d6cf40db9d94660cdc3076708c8', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/easy-parallel', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '11.1.21', 'version' => '11.1.21.0', 'reference' => 'aa99ef1947e84850ea7a9b34ea7d7ce6f5780bc7', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', '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.14.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.4.1', 'version' => '0.4.1.0', 'reference' => '79261cc280aded96d098e1b0e0ba0c4881b432c2', 'type' => 'library', 'install_path' => __DIR__ . '/../fidry/cpu-core-counter', 'aliases' => array(), 'dev_requirement' => \false), 'nette/utils' => array('pretty_version' => 'v3.2.8', 'version' => '3.2.8.0', 'reference' => '02a54c4c872b99e4ec05c4aec54b5a06eb0f6368', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.15.2', 'version' => '4.15.2.0', 'reference' => 'f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc', '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.15.3', 'version' => '1.15.3.0', 'reference' => '61800f71a5526081d1b5633766aa88341f1ade76', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan' => array('pretty_version' => '1.9.4', 'version' => '1.9.4.0', 'reference' => 'd03bccee595e2146b7c9d174486b84f4dc61b0f2', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan-phpunit' => array('pretty_version' => '1.3.3', 'version' => '1.3.3.0', 'reference' => '54a24bd23e9e80ee918cdc24f909d376c2e273f7', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../phpstan/phpstan-phpunit', '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.3.0', 'version' => '1.3.0.0', 'reference' => '187fb56f46d424afb6ec4ad089269c72eec2e137', 'type' => 'library', 'install_path' => __DIR__ . '/../react/event-loop', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise' => array('pretty_version' => 'v2.9.0', 'version' => '2.9.0.0', 'reference' => '234f8fd1023c9158e2314fa9d7d0e6a83db42910', '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.14.x-dev', 1 => 'dev-main')), 'rector/rector-doctrine' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'd5c39ae136f134e69af826d06628fd54c135ef6b', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-doctrine', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-downgrade-php' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '6cf8d9dc726e3fcf577c1c166bfe2b9893623d48', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-downgrade-php', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-php-parser' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '9ea5f622c1ed47addb197ded25a6bac39c39c596', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-php-parser', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-phpunit' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'a236bc6345cdbeeb8d36e9524b432bdd32cc777a', '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.14.x-dev'), 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'b463377817b8d27fbf97c4d576bea9abf31b8261', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'sebastian/diff' => array('pretty_version' => '4.0.4', 'version' => '4.0.4.0', 'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/cache-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.0')), 'symfony/config' => array('pretty_version' => 'v6.2.0', 'version' => '6.2.0.0', 'reference' => 'ebf27792246165a2a0b6b69ec9c620cac8c5a2f0', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v6.2.2', 'version' => '6.2.2.0', 'reference' => '5a9bd5c543f00157c55face973c149957467db31', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/contracts' => array('pretty_version' => 'v3.2.0', 'version' => '3.2.0.0', 'reference' => 'c47da22960a1eb5e39c1ad84120734e680265610', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/dependency-injection' => array('pretty_version' => 'v6.1.8', 'version' => '6.1.8.0', 'reference' => '11e33ed84db0ced77511a23b35168db127909f0e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.0')), 'symfony/event-dispatcher-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.0')), 'symfony/filesystem' => array('pretty_version' => 'v6.2.0', 'version' => '6.2.0.0', 'reference' => '50b2523c874605cf3d4acf7a9e2b30b6a440a016', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.2.0', 'version' => '6.2.0.0', 'reference' => 'eb2355f69519e4ef33f1835bca4c935f5d42e570', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/http-client-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.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/service-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.0')), 'symfony/service-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0|3.0')), 'symfony/string' => array('pretty_version' => 'v6.2.2', 'version' => '6.2.2.0', 'reference' => '863219fd713fa41cbcd285a79723f94672faff4d', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.2.0')), 'symplify/easy-parallel' => array('pretty_version' => '11.1.24', 'version' => '11.1.24.0', 'reference' => '1a4cb5a7e877257591d41a97384b18754a301e61', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/easy-parallel', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '11.1.24', 'version' => '11.1.24.0', 'reference' => '822896f06a0cdb8effbf5371459d8fffd24a4eab', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', '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 512e8b6e130..5007dcb14e0 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 d5c39ae'), '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 b1ca6d7'), 'rector/rector-php-parser' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-php-parser', 'relative_install_path' => '../../rector-php-parser', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 9ea5f62'), '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 a236bc6'), '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 b463377')); + 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 d5c39ae'), '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 6cf8d9d'), 'rector/rector-php-parser' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-php-parser', 'relative_install_path' => '../../rector-php-parser', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 9ea5f62'), '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 a236bc6'), '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 b463377')); private function __construct() { } diff --git a/vendor/rector/rector-downgrade-php/rules/DowngradePhp55/Rector/FuncCall/DowngradeBoolvalRector.php b/vendor/rector/rector-downgrade-php/rules/DowngradePhp55/Rector/FuncCall/DowngradeBoolvalRector.php index db2b5813b1c..d86bdc3caae 100644 --- a/vendor/rector/rector-downgrade-php/rules/DowngradePhp55/Rector/FuncCall/DowngradeBoolvalRector.php +++ b/vendor/rector/rector-downgrade-php/rules/DowngradePhp55/Rector/FuncCall/DowngradeBoolvalRector.php @@ -91,7 +91,7 @@ CODE_SAMPLE if (!$this->isBoolvalReference($arg)) { continue; } - if ($functionLikeReflection === null) { + if (!$functionLikeReflection instanceof FunctionReflection) { $functionLikeReflection = $this->reflectionResolver->resolveFunctionLikeReflectionFromCall($funcCall); if (!$functionLikeReflection instanceof FunctionReflection) { break; diff --git a/vendor/rector/rector-downgrade-php/rules/DowngradePhp71/Rector/ClassConst/DowngradeClassConstantVisibilityRector.php b/vendor/rector/rector-downgrade-php/rules/DowngradePhp71/Rector/ClassConst/DowngradeClassConstantVisibilityRector.php index ae4c2a1a621..f615b6228a0 100644 --- a/vendor/rector/rector-downgrade-php/rules/DowngradePhp71/Rector/ClassConst/DowngradeClassConstantVisibilityRector.php +++ b/vendor/rector/rector-downgrade-php/rules/DowngradePhp71/Rector/ClassConst/DowngradeClassConstantVisibilityRector.php @@ -6,7 +6,6 @@ namespace Rector\DowngradePhp71\Rector\ClassConst; use PhpParser\Node; use PhpParser\Node\Stmt\ClassConst; use Rector\Core\Rector\AbstractRector; -use Rector\Privatization\NodeManipulator\VisibilityManipulator; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** @@ -16,15 +15,6 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; */ final class DowngradeClassConstantVisibilityRector extends AbstractRector { - /** - * @readonly - * @var \Rector\Privatization\NodeManipulator\VisibilityManipulator - */ - private $visibilityManipulator; - public function __construct(VisibilityManipulator $visibilityManipulator) - { - $this->visibilityManipulator = $visibilityManipulator; - } public function getRuleDefinition() : RuleDefinition { return new RuleDefinition('Downgrade class constant visibility', [new CodeSample(<<<'CODE_SAMPLE' @@ -55,9 +45,12 @@ CODE_SAMPLE /** * @param ClassConst $node */ - public function refactor(Node $node) : ClassConst + public function refactor(Node $node) : ?ClassConst { - $this->visibilityManipulator->removeVisibility($node); + if ($node->flags === 0) { + return null; + } + $node->flags = 0; return $node; } } diff --git a/vendor/rector/rector-downgrade-php/rules/DowngradePhp80/Reflection/SimplePhpParameterReflection.php b/vendor/rector/rector-downgrade-php/rules/DowngradePhp80/Reflection/SimplePhpParameterReflection.php index e2e40bf9e63..e976a1275ed 100644 --- a/vendor/rector/rector-downgrade-php/rules/DowngradePhp80/Reflection/SimplePhpParameterReflection.php +++ b/vendor/rector/rector-downgrade-php/rules/DowngradePhp80/Reflection/SimplePhpParameterReflection.php @@ -17,18 +17,18 @@ final class SimplePhpParameterReflection implements ParameterReflection * @readonly * @var \ReflectionParameter */ - private $parameter; + private $reflectionParameter; public function __construct(ReflectionFunction $reflectionFunction, int $position) { - $this->parameter = $reflectionFunction->getParameters()[$position]; + $this->reflectionParameter = $reflectionFunction->getParameters()[$position]; } public function getName() : string { - return $this->parameter->getName(); + return $this->reflectionParameter->getName(); } public function isOptional() : bool { - return $this->parameter->isOptional(); + return $this->reflectionParameter->isOptional(); } /** * getType() is never used yet on manual object creation, and the implementation require PHPStan $phpDocType services injection @@ -40,17 +40,17 @@ final class SimplePhpParameterReflection implements ParameterReflection } public function passedByReference() : PassedByReference { - return $this->parameter->isPassedByReference() ? PassedByReference::createCreatesNewVariable() : PassedByReference::createNo(); + return $this->reflectionParameter->isPassedByReference() ? PassedByReference::createCreatesNewVariable() : PassedByReference::createNo(); } public function isVariadic() : bool { - return $this->parameter->isVariadic(); + return $this->reflectionParameter->isVariadic(); } public function getDefaultValue() : ?Type { try { - if ($this->parameter->isDefaultValueAvailable()) { - $defaultValue = $this->parameter->getDefaultValue(); + if ($this->reflectionParameter->isDefaultValueAvailable()) { + $defaultValue = $this->reflectionParameter->getDefaultValue(); return ConstantTypeHelper::getTypeFromValue($defaultValue); } } catch (Throwable $exception) { diff --git a/vendor/symplify/easy-parallel/composer.json b/vendor/symplify/easy-parallel/composer.json index 7bb3d217110..7a05cd9a36f 100644 --- a/vendor/symplify/easy-parallel/composer.json +++ b/vendor/symplify/easy-parallel/composer.json @@ -12,7 +12,7 @@ "fidry\/cpu-core-counter": "^0.4.0" }, "require-dev": { - "symplify\/package-builder": "^11.1.21", + "symplify\/package-builder": "^11.1.24", "phpunit\/phpunit": "^9.5.26" }, "autoload": { @@ -34,23 +34,23 @@ "platform-check": false }, "conflict": { - "symplify\/phpstan-rules": "<11.1.21", - "symplify\/easy-testing": "<11.1.21", - "symplify\/rule-doc-generator-contracts": "<11.1.21", - "symplify\/php-config-printer": "<11.1.21", - "symplify\/autowire-array-parameter": "<11.1.21", - "symplify\/phpstan-extensions": "<11.1.21", - "symplify\/rule-doc-generator": "<11.1.21", - "symplify\/symfony-static-dumper": "<11.1.21", - "symplify\/config-transformer": "<11.1.21", - "symplify\/coding-standard": "<11.1.21", - "symplify\/smart-file-system": "<11.1.21", - "symplify\/symplify-kernel": "<11.1.21", - "symplify\/package-builder": "<11.1.21", - "symplify\/easy-ci": "<11.1.21", - "symplify\/monorepo-builder": "<11.1.21", - "symplify\/vendor-patches": "<11.1.21", - "symplify\/easy-coding-standard": "<11.1.21" + "symplify\/phpstan-rules": "<11.1.24", + "symplify\/easy-testing": "<11.1.24", + "symplify\/rule-doc-generator-contracts": "<11.1.24", + "symplify\/php-config-printer": "<11.1.24", + "symplify\/autowire-array-parameter": "<11.1.24", + "symplify\/phpstan-extensions": "<11.1.24", + "symplify\/rule-doc-generator": "<11.1.24", + "symplify\/symfony-static-dumper": "<11.1.24", + "symplify\/config-transformer": "<11.1.24", + "symplify\/coding-standard": "<11.1.24", + "symplify\/smart-file-system": "<11.1.24", + "symplify\/symplify-kernel": "<11.1.24", + "symplify\/package-builder": "<11.1.24", + "symplify\/easy-ci": "<11.1.24", + "symplify\/monorepo-builder": "<11.1.24", + "symplify\/vendor-patches": "<11.1.24", + "symplify\/easy-coding-standard": "<11.1.24" }, "minimum-stability": "dev", "prefer-stable": true diff --git a/vendor/symplify/rule-doc-generator-contracts/composer.json b/vendor/symplify/rule-doc-generator-contracts/composer.json index a75618659c7..f4d0dfbf337 100644 --- a/vendor/symplify/rule-doc-generator-contracts/composer.json +++ b/vendor/symplify/rule-doc-generator-contracts/composer.json @@ -17,23 +17,23 @@ } }, "conflict": { - "symplify\/phpstan-rules": "<11.1.21", - "symplify\/easy-testing": "<11.1.21", - "symplify\/php-config-printer": "<11.1.21", - "symplify\/autowire-array-parameter": "<11.1.21", - "symplify\/package-builder": "<11.1.21", - "symplify\/phpstan-extensions": "<11.1.21", - "symplify\/rule-doc-generator": "<11.1.21", - "symplify\/smart-file-system": "<11.1.21", - "symplify\/symfony-static-dumper": "<11.1.21", - "symplify\/symplify-kernel": "<11.1.21", - "symplify\/config-transformer": "<11.1.21", - "symplify\/coding-standard": "<11.1.21", - "symplify\/easy-parallel": "<11.1.21", - "symplify\/easy-ci": "<11.1.21", - "symplify\/monorepo-builder": "<11.1.21", - "symplify\/vendor-patches": "<11.1.21", - "symplify\/easy-coding-standard": "<11.1.21" + "symplify\/phpstan-rules": "<11.1.24", + "symplify\/easy-testing": "<11.1.24", + "symplify\/php-config-printer": "<11.1.24", + "symplify\/autowire-array-parameter": "<11.1.24", + "symplify\/package-builder": "<11.1.24", + "symplify\/phpstan-extensions": "<11.1.24", + "symplify\/rule-doc-generator": "<11.1.24", + "symplify\/smart-file-system": "<11.1.24", + "symplify\/symfony-static-dumper": "<11.1.24", + "symplify\/symplify-kernel": "<11.1.24", + "symplify\/config-transformer": "<11.1.24", + "symplify\/coding-standard": "<11.1.24", + "symplify\/easy-parallel": "<11.1.24", + "symplify\/easy-ci": "<11.1.24", + "symplify\/monorepo-builder": "<11.1.24", + "symplify\/vendor-patches": "<11.1.24", + "symplify\/easy-coding-standard": "<11.1.24" }, "minimum-stability": "dev", "prefer-stable": true