From b7fb4398da03e79b05042d93c344f56b1c660aae Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sat, 29 Oct 2022 10:54:11 +0000 Subject: [PATCH] Updated Rector to commit 997e5f4ae8c388b8a12d16539e8109fe821e8fd6 https://github.com/rectorphp/rector-src/commit/997e5f4ae8c388b8a12d16539e8109fe821e8fd6 [TypeDeclaration] Skip intersection with iterable on ReturnTypeDeclarationRector on php 8.1 feature enabled (#3022) --- .../AccessoryLiteralStringTypeMapper.php | 53 ++++++++++ .../AccessoryNonEmptyStringTypeMapper.php | 16 ++- .../AccessoryNonFalsyStringTypeMapper.php | 16 ++- .../AccessoryNumericStringTypeMapper.php | 16 ++- .../TypeMapper/ClassStringTypeMapper.php | 62 ++++-------- .../GenericClassStringTypeMapper.php | 95 ++++++++++++++++++ .../TypeMapper/IntersectionTypeMapper.php | 43 +++++--- src/Application/VersionResolver.php | 4 +- vendor/autoload.php | 2 +- vendor/composer/autoload_classmap.php | 5 + vendor/composer/autoload_real.php | 14 +-- vendor/composer/autoload_static.php | 13 ++- vendor/composer/installed.json | 48 ++++----- vendor/composer/installed.php | 2 +- .../src/Rules/PHPUnit/CoversHelper.php | 13 ++- .../src/GeneratedConfig.php | 2 +- .../config/sets/symfony/symfony51.php | 3 + .../config/sets/twig/level/up-to-twig-112.php | 10 ++ .../config/sets/twig/level/up-to-twig-127.php | 11 +++ .../config/sets/twig/level/up-to-twig-134.php | 11 +++ .../config/sets/twig/level/up-to-twig-140.php | 11 +++ .../config/sets/twig/level/up-to-twig-20.php | 11 +++ .../config/sets/twig/level/up-to-twig-240.php | 11 +++ .../docs/rector_rules_overview.md | 22 +++++ .../CommandConstantReturnCodeRector.php | 97 +++++++++++++++++++ ...ethodAnnotationToRouteAnnotationRector.php | 8 +- .../src/Set/TwigLevelSetList.php | 33 +++++++ .../ConstantMap/SymfonyCommandConstantMap.php | 14 +++ .../SymfonyResponseConstantMap.php | 2 + vendor/symfony/console/Application.php | 4 +- 30 files changed, 547 insertions(+), 105 deletions(-) create mode 100644 packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryLiteralStringTypeMapper.php create mode 100644 packages/PHPStanStaticTypeMapper/TypeMapper/GenericClassStringTypeMapper.php create mode 100644 vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-112.php create mode 100644 vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-127.php create mode 100644 vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-134.php create mode 100644 vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-140.php create mode 100644 vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-20.php create mode 100644 vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-240.php create mode 100644 vendor/rector/rector-symfony/src/Rector/ClassMethod/CommandConstantReturnCodeRector.php create mode 100644 vendor/rector/rector-symfony/src/Set/TwigLevelSetList.php create mode 100644 vendor/rector/rector-symfony/src/ValueObject/ConstantMap/SymfonyCommandConstantMap.php diff --git a/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryLiteralStringTypeMapper.php b/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryLiteralStringTypeMapper.php new file mode 100644 index 00000000000..56422257fd8 --- /dev/null +++ b/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryLiteralStringTypeMapper.php @@ -0,0 +1,53 @@ + + */ +final class AccessoryLiteralStringTypeMapper implements TypeMapperInterface +{ + /** + * @readonly + * @var \Rector\Core\Php\PhpVersionProvider + */ + private $phpVersionProvider; + public function __construct(PhpVersionProvider $phpVersionProvider) + { + $this->phpVersionProvider = $phpVersionProvider; + } + /** + * @return class-string + */ + public function getNodeClass() : string + { + return AccessoryLiteralStringType::class; + } + /** + * @param AccessoryLiteralStringType $type + */ + public function mapToPHPStanPhpDocTypeNode(Type $type, string $typeKind) : TypeNode + { + return new IdentifierTypeNode('literal-string'); + } + /** + * @param AccessoryLiteralStringType $type + */ + public function mapToPhpParserNode(Type $type, string $typeKind) : ?Node + { + if (!$this->phpVersionProvider->isAtLeastPhpVersion(PhpVersionFeature::SCALAR_TYPES)) { + return null; + } + return new Name('string'); + } +} diff --git a/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryNonEmptyStringTypeMapper.php b/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryNonEmptyStringTypeMapper.php index d4c437a2c44..b8fd9dd061e 100644 --- a/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryNonEmptyStringTypeMapper.php +++ b/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryNonEmptyStringTypeMapper.php @@ -9,12 +9,23 @@ use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode; use PHPStan\PhpDocParser\Ast\Type\TypeNode; use PHPStan\Type\Accessory\AccessoryNonEmptyStringType; use PHPStan\Type\Type; +use Rector\Core\Php\PhpVersionProvider; +use Rector\Core\ValueObject\PhpVersionFeature; use Rector\PHPStanStaticTypeMapper\Contract\TypeMapperInterface; /** * @implements TypeMapperInterface */ final class AccessoryNonEmptyStringTypeMapper implements TypeMapperInterface { + /** + * @readonly + * @var \Rector\Core\Php\PhpVersionProvider + */ + private $phpVersionProvider; + public function __construct(PhpVersionProvider $phpVersionProvider) + { + $this->phpVersionProvider = $phpVersionProvider; + } /** * @return class-string */ @@ -27,13 +38,16 @@ final class AccessoryNonEmptyStringTypeMapper implements TypeMapperInterface */ public function mapToPHPStanPhpDocTypeNode(Type $type, string $typeKind) : TypeNode { - return new IdentifierTypeNode('string'); + return new IdentifierTypeNode('non-empty-string'); } /** * @param AccessoryNonEmptyStringType $type */ public function mapToPhpParserNode(Type $type, string $typeKind) : ?Node { + if (!$this->phpVersionProvider->isAtLeastPhpVersion(PhpVersionFeature::SCALAR_TYPES)) { + return null; + } return new Name('string'); } } diff --git a/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryNonFalsyStringTypeMapper.php b/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryNonFalsyStringTypeMapper.php index cdc243142b0..248faed5e90 100644 --- a/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryNonFalsyStringTypeMapper.php +++ b/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryNonFalsyStringTypeMapper.php @@ -9,12 +9,23 @@ use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode; use PHPStan\PhpDocParser\Ast\Type\TypeNode; use PHPStan\Type\Accessory\AccessoryNonFalsyStringType; use PHPStan\Type\Type; +use Rector\Core\Php\PhpVersionProvider; +use Rector\Core\ValueObject\PhpVersionFeature; use Rector\PHPStanStaticTypeMapper\Contract\TypeMapperInterface; /** * @implements TypeMapperInterface */ final class AccessoryNonFalsyStringTypeMapper implements TypeMapperInterface { + /** + * @readonly + * @var \Rector\Core\Php\PhpVersionProvider + */ + private $phpVersionProvider; + public function __construct(PhpVersionProvider $phpVersionProvider) + { + $this->phpVersionProvider = $phpVersionProvider; + } /** * @return class-string */ @@ -27,13 +38,16 @@ final class AccessoryNonFalsyStringTypeMapper implements TypeMapperInterface */ public function mapToPHPStanPhpDocTypeNode(Type $type, string $typeKind) : TypeNode { - return new IdentifierTypeNode('string'); + return new IdentifierTypeNode('non-falsy-string'); } /** * @param AccessoryNonFalsyStringType $type */ public function mapToPhpParserNode(Type $type, string $typeKind) : ?Node { + if (!$this->phpVersionProvider->isAtLeastPhpVersion(PhpVersionFeature::SCALAR_TYPES)) { + return null; + } return new Name('string'); } } diff --git a/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryNumericStringTypeMapper.php b/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryNumericStringTypeMapper.php index 2503d2fef67..b7962480810 100644 --- a/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryNumericStringTypeMapper.php +++ b/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryNumericStringTypeMapper.php @@ -9,12 +9,23 @@ use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode; use PHPStan\PhpDocParser\Ast\Type\TypeNode; use PHPStan\Type\Accessory\AccessoryNumericStringType; use PHPStan\Type\Type; +use Rector\Core\Php\PhpVersionProvider; +use Rector\Core\ValueObject\PhpVersionFeature; use Rector\PHPStanStaticTypeMapper\Contract\TypeMapperInterface; /** * @implements TypeMapperInterface */ final class AccessoryNumericStringTypeMapper implements TypeMapperInterface { + /** + * @readonly + * @var \Rector\Core\Php\PhpVersionProvider + */ + private $phpVersionProvider; + public function __construct(PhpVersionProvider $phpVersionProvider) + { + $this->phpVersionProvider = $phpVersionProvider; + } /** * @return class-string */ @@ -27,13 +38,16 @@ final class AccessoryNumericStringTypeMapper implements TypeMapperInterface */ public function mapToPHPStanPhpDocTypeNode(Type $type, string $typeKind) : TypeNode { - return new IdentifierTypeNode('string'); + return new IdentifierTypeNode('numeric-string'); } /** * @param AccessoryNumericStringType $type */ public function mapToPhpParserNode(Type $type, string $typeKind) : ?Node { + if (!$this->phpVersionProvider->isAtLeastPhpVersion(PhpVersionFeature::SCALAR_TYPES)) { + return null; + } return new Name('string'); } } diff --git a/packages/PHPStanStaticTypeMapper/TypeMapper/ClassStringTypeMapper.php b/packages/PHPStanStaticTypeMapper/TypeMapper/ClassStringTypeMapper.php index 94b19f90589..4a67240c678 100644 --- a/packages/PHPStanStaticTypeMapper/TypeMapper/ClassStringTypeMapper.php +++ b/packages/PHPStanStaticTypeMapper/TypeMapper/ClassStringTypeMapper.php @@ -4,27 +4,35 @@ declare (strict_types=1); namespace Rector\PHPStanStaticTypeMapper\TypeMapper; use PhpParser\Node; -use PhpParser\Node\Expr; use PhpParser\Node\Name; -use PHPStan\PhpDocParser\Ast\Type\GenericTypeNode; use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode; use PHPStan\PhpDocParser\Ast\Type\TypeNode; use PHPStan\Type\ClassStringType; use PHPStan\Type\Generic\GenericClassStringType; -use PHPStan\Type\ObjectType; use PHPStan\Type\Type; +use Rector\Core\Php\PhpVersionProvider; +use Rector\Core\ValueObject\PhpVersionFeature; use Rector\PHPStanStaticTypeMapper\Contract\TypeMapperInterface; -use Rector\PHPStanStaticTypeMapper\PHPStanStaticTypeMapper; -use RectorPrefix202210\Symfony\Contracts\Service\Attribute\Required; /** * @implements TypeMapperInterface */ final class ClassStringTypeMapper implements TypeMapperInterface { /** - * @var \Rector\PHPStanStaticTypeMapper\PHPStanStaticTypeMapper + * @readonly + * @var \Rector\PHPStanStaticTypeMapper\TypeMapper\GenericClassStringTypeMapper */ - private $phpStanStaticTypeMapper; + private $genericClassStringTypeMapper; + /** + * @readonly + * @var \Rector\Core\Php\PhpVersionProvider + */ + private $phpVersionProvider; + public function __construct(\Rector\PHPStanStaticTypeMapper\TypeMapper\GenericClassStringTypeMapper $genericClassStringTypeMapper, PhpVersionProvider $phpVersionProvider) + { + $this->genericClassStringTypeMapper = $genericClassStringTypeMapper; + $this->phpVersionProvider = $phpVersionProvider; + } /** * @return class-string */ @@ -37,49 +45,19 @@ final class ClassStringTypeMapper implements TypeMapperInterface */ public function mapToPHPStanPhpDocTypeNode(Type $type, string $typeKind) : TypeNode { - $attributeAwareIdentifierTypeNode = new IdentifierTypeNode('class-string'); if ($type instanceof GenericClassStringType) { - $genericType = $this->resolveGenericObjectType($type); - $genericTypeNode = $this->phpStanStaticTypeMapper->mapToPHPStanPhpDocTypeNode($genericType, $typeKind); - return new GenericTypeNode($attributeAwareIdentifierTypeNode, [$genericTypeNode]); + return $this->genericClassStringTypeMapper->mapToPHPStanPhpDocTypeNode($type, $typeKind); } - return $attributeAwareIdentifierTypeNode; + return new IdentifierTypeNode('class-string'); } /** * @param ClassStringType $type */ public function mapToPhpParserNode(Type $type, string $typeKind) : ?Node { + if (!$this->phpVersionProvider->isAtLeastPhpVersion(PhpVersionFeature::SCALAR_TYPES)) { + return null; + } return new Name('string'); } - /** - * @required - */ - public function autowire(PHPStanStaticTypeMapper $phpStanStaticTypeMapper) : void - { - $this->phpStanStaticTypeMapper = $phpStanStaticTypeMapper; - } - private function normalizeType(string $classType) : string - { - if (\is_a($classType, Expr::class, \true)) { - return Expr::class; - } - if (\is_a($classType, Node::class, \true)) { - return Node::class; - } - return $classType; - } - /** - * @return \PHPStan\Type\ObjectType|\PHPStan\Type\Type - */ - private function resolveGenericObjectType(GenericClassStringType $genericClassStringType) - { - $genericType = $genericClassStringType->getGenericType(); - if (!$genericType instanceof ObjectType) { - return $genericType; - } - $className = $genericType->getClassName(); - $className = $this->normalizeType($className); - return new ObjectType($className); - } } diff --git a/packages/PHPStanStaticTypeMapper/TypeMapper/GenericClassStringTypeMapper.php b/packages/PHPStanStaticTypeMapper/TypeMapper/GenericClassStringTypeMapper.php new file mode 100644 index 00000000000..6da62c30e86 --- /dev/null +++ b/packages/PHPStanStaticTypeMapper/TypeMapper/GenericClassStringTypeMapper.php @@ -0,0 +1,95 @@ + + */ +final class GenericClassStringTypeMapper implements TypeMapperInterface +{ + /** + * @var \Rector\PHPStanStaticTypeMapper\PHPStanStaticTypeMapper + */ + private $phpStanStaticTypeMapper; + /** + * @readonly + * @var \Rector\Core\Php\PhpVersionProvider + */ + private $phpVersionProvider; + public function __construct(PhpVersionProvider $phpVersionProvider) + { + $this->phpVersionProvider = $phpVersionProvider; + } + /** + * @required + */ + public function autowire(PHPStanStaticTypeMapper $phpStanStaticTypeMapper) : void + { + $this->phpStanStaticTypeMapper = $phpStanStaticTypeMapper; + } + /** + * @return class-string + */ + public function getNodeClass() : string + { + return GenericClassStringType::class; + } + /** + * @param GenericClassStringType $type + */ + public function mapToPHPStanPhpDocTypeNode(Type $type, string $typeKind) : TypeNode + { + $attributeAwareIdentifierTypeNode = new IdentifierTypeNode('class-string'); + $genericType = $this->resolveGenericObjectType($type); + $genericTypeNode = $this->phpStanStaticTypeMapper->mapToPHPStanPhpDocTypeNode($genericType, $typeKind); + return new GenericTypeNode($attributeAwareIdentifierTypeNode, [$genericTypeNode]); + } + /** + * @param GenericClassStringType $type + */ + public function mapToPhpParserNode(Type $type, string $typeKind) : ?Node + { + if (!$this->phpVersionProvider->isAtLeastPhpVersion(PhpVersionFeature::SCALAR_TYPES)) { + return null; + } + return new Name('string'); + } + /** + * @return \PHPStan\Type\ObjectType|\PHPStan\Type\Type + */ + private function resolveGenericObjectType(GenericClassStringType $genericClassStringType) + { + $genericType = $genericClassStringType->getGenericType(); + if (!$genericType instanceof ObjectType) { + return $genericType; + } + $className = $genericType->getClassName(); + $className = $this->normalizeType($className); + return new ObjectType($className); + } + private function normalizeType(string $classType) : string + { + if (\is_a($classType, Expr::class, \true)) { + return Expr::class; + } + if (\is_a($classType, Node::class, \true)) { + return Node::class; + } + return $classType; + } +} diff --git a/packages/PHPStanStaticTypeMapper/TypeMapper/IntersectionTypeMapper.php b/packages/PHPStanStaticTypeMapper/TypeMapper/IntersectionTypeMapper.php index 450df351b74..4466073c8c0 100644 --- a/packages/PHPStanStaticTypeMapper/TypeMapper/IntersectionTypeMapper.php +++ b/packages/PHPStanStaticTypeMapper/TypeMapper/IntersectionTypeMapper.php @@ -7,9 +7,10 @@ use PhpParser\Node; use PhpParser\Node\Name; use PhpParser\Node\Name\FullyQualified; use PHPStan\PhpDocParser\Ast\Type\TypeNode; -use PHPStan\Type\Generic\GenericClassStringType; +use PHPStan\Reflection\ReflectionProvider; use PHPStan\Type\IntersectionType; use PHPStan\Type\ObjectType; +use PHPStan\Type\ObjectWithoutClassType; use PHPStan\Type\Type; use Rector\BetterPhpDocParser\ValueObject\Type\BracketsAwareIntersectionTypeNode; use Rector\Core\Php\PhpVersionProvider; @@ -22,10 +23,6 @@ use RectorPrefix202210\Symfony\Contracts\Service\Attribute\Required; */ final class IntersectionTypeMapper implements TypeMapperInterface { - /** - * @var string - */ - private const STRING = 'string'; /** * @var \Rector\PHPStanStaticTypeMapper\PHPStanStaticTypeMapper */ @@ -35,9 +32,15 @@ final class IntersectionTypeMapper implements TypeMapperInterface * @var \Rector\Core\Php\PhpVersionProvider */ private $phpVersionProvider; - public function __construct(PhpVersionProvider $phpVersionProvider) + /** + * @readonly + * @var \PHPStan\Reflection\ReflectionProvider + */ + private $reflectionProvider; + public function __construct(PhpVersionProvider $phpVersionProvider, ReflectionProvider $reflectionProvider) { $this->phpVersionProvider = $phpVersionProvider; + $this->reflectionProvider = $reflectionProvider; } /** * @required @@ -79,19 +82,31 @@ final class IntersectionTypeMapper implements TypeMapperInterface $intersectionedTypeNodes = []; foreach ($type->getTypes() as $intersectionedType) { $resolvedType = $this->phpStanStaticTypeMapper->mapToPhpParserNode($intersectionedType, $typeKind); - if ($intersectionedType instanceof GenericClassStringType) { - $resolvedTypeName = self::STRING; - $resolvedType = new Name(self::STRING); - } elseif (!$resolvedType instanceof Name) { - return null; - } else { - $resolvedTypeName = (string) $resolvedType; + if (!$resolvedType instanceof Name) { + continue; } - if (\in_array($resolvedTypeName, [self::STRING, 'object'], \true)) { + $resolvedTypeName = (string) $resolvedType; + if ($intersectionedType instanceof ObjectWithoutClassType) { return $resolvedType; } + /** + * $this->reflectionProvider->hasClass($resolvedTypeName) returns true on iterable type + * this ensure type is ObjectType early + */ + if (!$intersectionedType instanceof ObjectType) { + continue; + } + if (!$this->reflectionProvider->hasClass($resolvedTypeName)) { + continue; + } $intersectionedTypeNodes[] = $resolvedType; } + if ($intersectionedTypeNodes === []) { + return null; + } + if (\count($intersectionedTypeNodes) === 1) { + return \current($intersectionedTypeNodes); + } return new Node\IntersectionType($intersectionedTypeNodes); } private function matchMockObjectType(IntersectionType $intersectionType) : ?FullyQualified diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index f8258171412..d679ea15f39 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -17,12 +17,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = 'af4cf28751f652d2ee1a8319d6cb39bf8614a1c1'; + public const PACKAGE_VERSION = '997e5f4ae8c388b8a12d16539e8109fe821e8fd6'; /** * @api * @var string */ - public const RELEASE_DATE = '2022-10-28 10:12:28'; + public const RELEASE_DATE = '2022-10-29 17:49:34'; /** * @var int */ diff --git a/vendor/autoload.php b/vendor/autoload.php index ee3bff31e5f..f9bba7ac6cd 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 ComposerAutoloaderInit3e77fd98660aed01aa501e8309ba9490::getLoader(); +return ComposerAutoloaderInitebb455d7d17656555c4fac8d9342a38c::getLoader(); diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 87e2d35b3dd..781c86c42ea 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -1955,6 +1955,7 @@ return array( 'Rector\\PHPStanStaticTypeMapper\\TypeAnalyzer\\BoolUnionTypeAnalyzer' => $baseDir . '/packages/PHPStanStaticTypeMapper/TypeAnalyzer/BoolUnionTypeAnalyzer.php', 'Rector\\PHPStanStaticTypeMapper\\TypeAnalyzer\\UnionTypeAnalyzer' => $baseDir . '/packages/PHPStanStaticTypeMapper/TypeAnalyzer/UnionTypeAnalyzer.php', 'Rector\\PHPStanStaticTypeMapper\\TypeAnalyzer\\UnionTypeCommonTypeNarrower' => $baseDir . '/packages/PHPStanStaticTypeMapper/TypeAnalyzer/UnionTypeCommonTypeNarrower.php', + 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\AccessoryLiteralStringTypeMapper' => $baseDir . '/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryLiteralStringTypeMapper.php', 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\AccessoryNonEmptyStringTypeMapper' => $baseDir . '/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryNonEmptyStringTypeMapper.php', 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\AccessoryNonFalsyStringTypeMapper' => $baseDir . '/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryNonFalsyStringTypeMapper.php', 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\AccessoryNumericStringTypeMapper' => $baseDir . '/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryNumericStringTypeMapper.php', @@ -1965,6 +1966,7 @@ return array( 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\ClassStringTypeMapper' => $baseDir . '/packages/PHPStanStaticTypeMapper/TypeMapper/ClassStringTypeMapper.php', 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\ClosureTypeMapper' => $baseDir . '/packages/PHPStanStaticTypeMapper/TypeMapper/ClosureTypeMapper.php', 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\FloatTypeMapper' => $baseDir . '/packages/PHPStanStaticTypeMapper/TypeMapper/FloatTypeMapper.php', + 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\GenericClassStringTypeMapper' => $baseDir . '/packages/PHPStanStaticTypeMapper/TypeMapper/GenericClassStringTypeMapper.php', 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\HasMethodTypeMapper' => $baseDir . '/packages/PHPStanStaticTypeMapper/TypeMapper/HasMethodTypeMapper.php', 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\HasOffsetTypeMapper' => $baseDir . '/packages/PHPStanStaticTypeMapper/TypeMapper/HasOffsetTypeMapper.php', 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\HasOffsetValueTypeTypeMapper' => $baseDir . '/packages/PHPStanStaticTypeMapper/TypeMapper/HasOffsetValueTypeTypeMapper.php', @@ -2491,6 +2493,7 @@ return array( 'Rector\\Symfony\\Rector\\ClassConstFetch\\ConsoleExceptionToErrorEventConstantRector' => $vendorDir . '/rector/rector-symfony/src/Rector/ClassConstFetch/ConsoleExceptionToErrorEventConstantRector.php', 'Rector\\Symfony\\Rector\\ClassMethod\\ActionSuffixRemoverRector' => $vendorDir . '/rector/rector-symfony/src/Rector/ClassMethod/ActionSuffixRemoverRector.php', 'Rector\\Symfony\\Rector\\ClassMethod\\AddRouteAnnotationRector' => $vendorDir . '/rector/rector-symfony/src/Rector/ClassMethod/AddRouteAnnotationRector.php', + 'Rector\\Symfony\\Rector\\ClassMethod\\CommandConstantReturnCodeRector' => $vendorDir . '/rector/rector-symfony/src/Rector/ClassMethod/CommandConstantReturnCodeRector.php', 'Rector\\Symfony\\Rector\\ClassMethod\\ConsoleExecuteReturnIntRector' => $vendorDir . '/rector/rector-symfony/src/Rector/ClassMethod/ConsoleExecuteReturnIntRector.php', 'Rector\\Symfony\\Rector\\ClassMethod\\FormTypeGetParentRector' => $vendorDir . '/rector/rector-symfony/src/Rector/ClassMethod/FormTypeGetParentRector.php', 'Rector\\Symfony\\Rector\\ClassMethod\\GetRequestRector' => $vendorDir . '/rector/rector-symfony/src/Rector/ClassMethod/GetRequestRector.php', @@ -2564,6 +2567,7 @@ return array( 'Rector\\Symfony\\Set\\SwiftmailerSetList' => $vendorDir . '/rector/rector-symfony/src/Set/SwiftmailerSetList.php', 'Rector\\Symfony\\Set\\SymfonyLevelSetList' => $vendorDir . '/rector/rector-symfony/src/Set/SymfonyLevelSetList.php', 'Rector\\Symfony\\Set\\SymfonySetList' => $vendorDir . '/rector/rector-symfony/src/Set/SymfonySetList.php', + 'Rector\\Symfony\\Set\\TwigLevelSetList' => $vendorDir . '/rector/rector-symfony/src/Set/TwigLevelSetList.php', 'Rector\\Symfony\\Set\\TwigSetList' => $vendorDir . '/rector/rector-symfony/src/Set/TwigSetList.php', 'Rector\\Symfony\\TypeAnalyzer\\ArrayUnionResponseTypeAnalyzer' => $vendorDir . '/rector/rector-symfony/src/TypeAnalyzer/ArrayUnionResponseTypeAnalyzer.php', 'Rector\\Symfony\\TypeAnalyzer\\ContainerAwareAnalyzer' => $vendorDir . '/rector/rector-symfony/src/TypeAnalyzer/ContainerAwareAnalyzer.php', @@ -2571,6 +2575,7 @@ return array( 'Rector\\Symfony\\TypeAnalyzer\\JMSDITypeResolver' => $vendorDir . '/rector/rector-symfony/src/TypeAnalyzer/JMSDITypeResolver.php', 'Rector\\Symfony\\TypeDeclaration\\ReturnTypeDeclarationUpdater' => $vendorDir . '/rector/rector-symfony/src/TypeDeclaration/ReturnTypeDeclarationUpdater.php', 'Rector\\Symfony\\ValueObjectFactory\\ServiceMapFactory' => $vendorDir . '/rector/rector-symfony/src/ValueObjectFactory/ServiceMapFactory.php', + 'Rector\\Symfony\\ValueObject\\ConstantMap\\SymfonyCommandConstantMap' => $vendorDir . '/rector/rector-symfony/src/ValueObject/ConstantMap/SymfonyCommandConstantMap.php', 'Rector\\Symfony\\ValueObject\\ConstantMap\\SymfonyRequestConstantMap' => $vendorDir . '/rector/rector-symfony/src/ValueObject/ConstantMap/SymfonyRequestConstantMap.php', 'Rector\\Symfony\\ValueObject\\ConstantMap\\SymfonyResponseConstantMap' => $vendorDir . '/rector/rector-symfony/src/ValueObject/ConstantMap/SymfonyResponseConstantMap.php', 'Rector\\Symfony\\ValueObject\\EventNameToClassAndConstant' => $vendorDir . '/rector/rector-symfony/src/ValueObject/EventNameToClassAndConstant.php', diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 49fd1d22dd3..898460e794d 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit3e77fd98660aed01aa501e8309ba9490 +class ComposerAutoloaderInitebb455d7d17656555c4fac8d9342a38c { private static $loader; @@ -22,19 +22,19 @@ class ComposerAutoloaderInit3e77fd98660aed01aa501e8309ba9490 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit3e77fd98660aed01aa501e8309ba9490', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitebb455d7d17656555c4fac8d9342a38c', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit3e77fd98660aed01aa501e8309ba9490', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitebb455d7d17656555c4fac8d9342a38c', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit3e77fd98660aed01aa501e8309ba9490::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitebb455d7d17656555c4fac8d9342a38c::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $includeFiles = \Composer\Autoload\ComposerStaticInit3e77fd98660aed01aa501e8309ba9490::$files; + $includeFiles = \Composer\Autoload\ComposerStaticInitebb455d7d17656555c4fac8d9342a38c::$files; foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire3e77fd98660aed01aa501e8309ba9490($fileIdentifier, $file); + composerRequireebb455d7d17656555c4fac8d9342a38c($fileIdentifier, $file); } return $loader; @@ -46,7 +46,7 @@ class ComposerAutoloaderInit3e77fd98660aed01aa501e8309ba9490 * @param string $file * @return void */ -function composerRequire3e77fd98660aed01aa501e8309ba9490($fileIdentifier, $file) +function composerRequireebb455d7d17656555c4fac8d9342a38c($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 942d9492b0e..3b3badadd18 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit3e77fd98660aed01aa501e8309ba9490 +class ComposerStaticInitebb455d7d17656555c4fac8d9342a38c { public static $files = array ( 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', @@ -2205,6 +2205,7 @@ class ComposerStaticInit3e77fd98660aed01aa501e8309ba9490 'Rector\\PHPStanStaticTypeMapper\\TypeAnalyzer\\BoolUnionTypeAnalyzer' => __DIR__ . '/../..' . '/packages/PHPStanStaticTypeMapper/TypeAnalyzer/BoolUnionTypeAnalyzer.php', 'Rector\\PHPStanStaticTypeMapper\\TypeAnalyzer\\UnionTypeAnalyzer' => __DIR__ . '/../..' . '/packages/PHPStanStaticTypeMapper/TypeAnalyzer/UnionTypeAnalyzer.php', 'Rector\\PHPStanStaticTypeMapper\\TypeAnalyzer\\UnionTypeCommonTypeNarrower' => __DIR__ . '/../..' . '/packages/PHPStanStaticTypeMapper/TypeAnalyzer/UnionTypeCommonTypeNarrower.php', + 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\AccessoryLiteralStringTypeMapper' => __DIR__ . '/../..' . '/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryLiteralStringTypeMapper.php', 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\AccessoryNonEmptyStringTypeMapper' => __DIR__ . '/../..' . '/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryNonEmptyStringTypeMapper.php', 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\AccessoryNonFalsyStringTypeMapper' => __DIR__ . '/../..' . '/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryNonFalsyStringTypeMapper.php', 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\AccessoryNumericStringTypeMapper' => __DIR__ . '/../..' . '/packages/PHPStanStaticTypeMapper/TypeMapper/AccessoryNumericStringTypeMapper.php', @@ -2215,6 +2216,7 @@ class ComposerStaticInit3e77fd98660aed01aa501e8309ba9490 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\ClassStringTypeMapper' => __DIR__ . '/../..' . '/packages/PHPStanStaticTypeMapper/TypeMapper/ClassStringTypeMapper.php', 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\ClosureTypeMapper' => __DIR__ . '/../..' . '/packages/PHPStanStaticTypeMapper/TypeMapper/ClosureTypeMapper.php', 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\FloatTypeMapper' => __DIR__ . '/../..' . '/packages/PHPStanStaticTypeMapper/TypeMapper/FloatTypeMapper.php', + 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\GenericClassStringTypeMapper' => __DIR__ . '/../..' . '/packages/PHPStanStaticTypeMapper/TypeMapper/GenericClassStringTypeMapper.php', 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\HasMethodTypeMapper' => __DIR__ . '/../..' . '/packages/PHPStanStaticTypeMapper/TypeMapper/HasMethodTypeMapper.php', 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\HasOffsetTypeMapper' => __DIR__ . '/../..' . '/packages/PHPStanStaticTypeMapper/TypeMapper/HasOffsetTypeMapper.php', 'Rector\\PHPStanStaticTypeMapper\\TypeMapper\\HasOffsetValueTypeTypeMapper' => __DIR__ . '/../..' . '/packages/PHPStanStaticTypeMapper/TypeMapper/HasOffsetValueTypeTypeMapper.php', @@ -2741,6 +2743,7 @@ class ComposerStaticInit3e77fd98660aed01aa501e8309ba9490 'Rector\\Symfony\\Rector\\ClassConstFetch\\ConsoleExceptionToErrorEventConstantRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/ClassConstFetch/ConsoleExceptionToErrorEventConstantRector.php', 'Rector\\Symfony\\Rector\\ClassMethod\\ActionSuffixRemoverRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/ClassMethod/ActionSuffixRemoverRector.php', 'Rector\\Symfony\\Rector\\ClassMethod\\AddRouteAnnotationRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/ClassMethod/AddRouteAnnotationRector.php', + 'Rector\\Symfony\\Rector\\ClassMethod\\CommandConstantReturnCodeRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/ClassMethod/CommandConstantReturnCodeRector.php', 'Rector\\Symfony\\Rector\\ClassMethod\\ConsoleExecuteReturnIntRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/ClassMethod/ConsoleExecuteReturnIntRector.php', 'Rector\\Symfony\\Rector\\ClassMethod\\FormTypeGetParentRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/ClassMethod/FormTypeGetParentRector.php', 'Rector\\Symfony\\Rector\\ClassMethod\\GetRequestRector' => __DIR__ . '/..' . '/rector/rector-symfony/src/Rector/ClassMethod/GetRequestRector.php', @@ -2814,6 +2817,7 @@ class ComposerStaticInit3e77fd98660aed01aa501e8309ba9490 'Rector\\Symfony\\Set\\SwiftmailerSetList' => __DIR__ . '/..' . '/rector/rector-symfony/src/Set/SwiftmailerSetList.php', 'Rector\\Symfony\\Set\\SymfonyLevelSetList' => __DIR__ . '/..' . '/rector/rector-symfony/src/Set/SymfonyLevelSetList.php', 'Rector\\Symfony\\Set\\SymfonySetList' => __DIR__ . '/..' . '/rector/rector-symfony/src/Set/SymfonySetList.php', + 'Rector\\Symfony\\Set\\TwigLevelSetList' => __DIR__ . '/..' . '/rector/rector-symfony/src/Set/TwigLevelSetList.php', 'Rector\\Symfony\\Set\\TwigSetList' => __DIR__ . '/..' . '/rector/rector-symfony/src/Set/TwigSetList.php', 'Rector\\Symfony\\TypeAnalyzer\\ArrayUnionResponseTypeAnalyzer' => __DIR__ . '/..' . '/rector/rector-symfony/src/TypeAnalyzer/ArrayUnionResponseTypeAnalyzer.php', 'Rector\\Symfony\\TypeAnalyzer\\ContainerAwareAnalyzer' => __DIR__ . '/..' . '/rector/rector-symfony/src/TypeAnalyzer/ContainerAwareAnalyzer.php', @@ -2821,6 +2825,7 @@ class ComposerStaticInit3e77fd98660aed01aa501e8309ba9490 'Rector\\Symfony\\TypeAnalyzer\\JMSDITypeResolver' => __DIR__ . '/..' . '/rector/rector-symfony/src/TypeAnalyzer/JMSDITypeResolver.php', 'Rector\\Symfony\\TypeDeclaration\\ReturnTypeDeclarationUpdater' => __DIR__ . '/..' . '/rector/rector-symfony/src/TypeDeclaration/ReturnTypeDeclarationUpdater.php', 'Rector\\Symfony\\ValueObjectFactory\\ServiceMapFactory' => __DIR__ . '/..' . '/rector/rector-symfony/src/ValueObjectFactory/ServiceMapFactory.php', + 'Rector\\Symfony\\ValueObject\\ConstantMap\\SymfonyCommandConstantMap' => __DIR__ . '/..' . '/rector/rector-symfony/src/ValueObject/ConstantMap/SymfonyCommandConstantMap.php', 'Rector\\Symfony\\ValueObject\\ConstantMap\\SymfonyRequestConstantMap' => __DIR__ . '/..' . '/rector/rector-symfony/src/ValueObject/ConstantMap/SymfonyRequestConstantMap.php', 'Rector\\Symfony\\ValueObject\\ConstantMap\\SymfonyResponseConstantMap' => __DIR__ . '/..' . '/rector/rector-symfony/src/ValueObject/ConstantMap/SymfonyResponseConstantMap.php', 'Rector\\Symfony\\ValueObject\\EventNameToClassAndConstant' => __DIR__ . '/..' . '/rector/rector-symfony/src/ValueObject/EventNameToClassAndConstant.php', @@ -3047,9 +3052,9 @@ class ComposerStaticInit3e77fd98660aed01aa501e8309ba9490 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit3e77fd98660aed01aa501e8309ba9490::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit3e77fd98660aed01aa501e8309ba9490::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit3e77fd98660aed01aa501e8309ba9490::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitebb455d7d17656555c4fac8d9342a38c::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitebb455d7d17656555c4fac8d9342a38c::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitebb455d7d17656555c4fac8d9342a38c::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index f2ccbd1647e..1d4d0aec92a 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -795,17 +795,17 @@ }, { "name": "phpstan\/phpstan-phpunit", - "version": "1.2.1", - "version_normalized": "1.2.1.0", + "version": "1.2.2", + "version_normalized": "1.2.2.0", "source": { "type": "git", "url": "https:\/\/github.com\/phpstan\/phpstan-phpunit.git", - "reference": "09b5c9ab38d4d601bcff04b4c9240832b86f5dda" + "reference": "dea1f87344c6964c607d9076dee42d891f3923f0" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan-phpunit\/zipball\/09b5c9ab38d4d601bcff04b4c9240832b86f5dda", - "reference": "09b5c9ab38d4d601bcff04b4c9240832b86f5dda", + "url": "https:\/\/api.github.com\/repos\/phpstan\/phpstan-phpunit\/zipball\/dea1f87344c6964c607d9076dee42d891f3923f0", + "reference": "dea1f87344c6964c607d9076dee42d891f3923f0", "shasum": "" }, "require": { @@ -821,7 +821,7 @@ "phpstan\/phpstan-strict-rules": "^1.0", "phpunit\/phpunit": "^9.5" }, - "time": "2022-10-26T19:38:49+00:00", + "time": "2022-10-28T10:23:07+00:00", "type": "phpstan-extension", "extra": { "phpstan": { @@ -844,7 +844,7 @@ "description": "PHPUnit extensions and rules for PHPStan", "support": { "issues": "https:\/\/github.com\/phpstan\/phpstan-phpunit\/issues", - "source": "https:\/\/github.com\/phpstan\/phpstan-phpunit\/tree\/1.2.1" + "source": "https:\/\/github.com\/phpstan\/phpstan-phpunit\/tree\/1.2.2" }, "install-path": "..\/phpstan\/phpstan-phpunit" }, @@ -2128,12 +2128,12 @@ "source": { "type": "git", "url": "https:\/\/github.com\/rectorphp\/rector-symfony.git", - "reference": "644c5a4238b7dc002852900fbf6323bd2fbbd183" + "reference": "5f0c972b3cdeff3acfc1a17c9dbed1674023d2ac" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/644c5a4238b7dc002852900fbf6323bd2fbbd183", - "reference": "644c5a4238b7dc002852900fbf6323bd2fbbd183", + "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/5f0c972b3cdeff3acfc1a17c9dbed1674023d2ac", + "reference": "5f0c972b3cdeff3acfc1a17c9dbed1674023d2ac", "shasum": "" }, "require": { @@ -2164,7 +2164,7 @@ "symplify\/rule-doc-generator": "^11.1", "symplify\/vendor-patches": "^11.1" }, - "time": "2022-10-25T09:28:10+00:00", + "time": "2022-10-29T10:44:28+00:00", "default-branch": true, "type": "rector-extension", "extra": { @@ -2346,17 +2346,17 @@ }, { "name": "symfony\/console", - "version": "v6.1.6", - "version_normalized": "6.1.6.0", + "version": "v6.1.7", + "version_normalized": "6.1.7.0", "source": { "type": "git", "url": "https:\/\/github.com\/symfony\/console.git", - "reference": "7fa3b9cf17363468795e539231a5c91b02b608fc" + "reference": "a1282bd0c096e0bdb8800b104177e2ce404d8815" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/symfony\/console\/zipball\/7fa3b9cf17363468795e539231a5c91b02b608fc", - "reference": "7fa3b9cf17363468795e539231a5c91b02b608fc", + "url": "https:\/\/api.github.com\/repos\/symfony\/console\/zipball\/a1282bd0c096e0bdb8800b104177e2ce404d8815", + "reference": "a1282bd0c096e0bdb8800b104177e2ce404d8815", "shasum": "" }, "require": { @@ -2391,7 +2391,7 @@ "symfony\/lock": "", "symfony\/process": "" }, - "time": "2022-10-07T08:04:03+00:00", + "time": "2022-10-26T21:42:49+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -2425,7 +2425,7 @@ "terminal" ], "support": { - "source": "https:\/\/github.com\/symfony\/console\/tree\/v6.1.6" + "source": "https:\/\/github.com\/symfony\/console\/tree\/v6.1.7" }, "funding": [ { @@ -2951,17 +2951,17 @@ }, { "name": "symfony\/string", - "version": "v6.1.6", - "version_normalized": "6.1.6.0", + "version": "v6.1.7", + "version_normalized": "6.1.7.0", "source": { "type": "git", "url": "https:\/\/github.com\/symfony\/string.git", - "reference": "7e7e0ff180d4c5a6636eaad57b65092014b61864" + "reference": "823f143370880efcbdfa2dbca946b3358c4707e5" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/symfony\/string\/zipball\/7e7e0ff180d4c5a6636eaad57b65092014b61864", - "reference": "7e7e0ff180d4c5a6636eaad57b65092014b61864", + "url": "https:\/\/api.github.com\/repos\/symfony\/string\/zipball\/823f143370880efcbdfa2dbca946b3358c4707e5", + "reference": "823f143370880efcbdfa2dbca946b3358c4707e5", "shasum": "" }, "require": { @@ -3019,7 +3019,7 @@ "utf8" ], "support": { - "source": "https:\/\/github.com\/symfony\/string\/tree\/v6.1.6" + "source": "https:\/\/github.com\/symfony\/string\/tree\/v6.1.7" }, "funding": [ { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index e1b90e3af02..63d34360caf 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -2,4 +2,4 @@ namespace RectorPrefix202210; -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.0.0', 'version' => '3.0.0.0', 'reference' => 'e300eb6c535192decd27a85bc72a9290f0d6b3bd', '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), '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.1', 'version' => '4.15.1.0', 'reference' => '0ef6c55a3f47f89d7a374e6f835197a0b5fcf900', '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.13.0', 'version' => '1.13.0.0', 'reference' => '33aefcdab42900e36366d0feab6206e2dd68f947', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan' => array('pretty_version' => '1.8.11', 'version' => '1.8.11.0', 'reference' => '46e223dd68a620da18855c23046ddb00940b4014', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan-phpunit' => array('pretty_version' => '1.2.1', 'version' => '1.2.1.0', 'reference' => '09b5c9ab38d4d601bcff04b4c9240832b86f5dda', '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.1.1', 'version' => '1.1.1.0', 'reference' => '4bf736a2cccec7298bdf745db77585966fc2ca7e', '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' => '17bdb82a53af4f58dfb4c00634e8942e653bfaef', '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' => 'da1013feacd1f27dbd414734fd2768d9258a5f7b', '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' => '9c21f5f57464fc5af8765a1007eced8f7f62677c', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-php-parser', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-phpoffice' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '294de0ce80a9eb2c1b2d0d8e2762032dba0044e0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpoffice', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-phpunit' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '6fc267c6c82aa2980ebc8230b95e2039f957076c', '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' => '644c5a4238b7dc002852900fbf6323bd2fbbd183', '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.1.1')), 'symfony/config' => array('pretty_version' => 'v6.1.3', 'version' => '6.1.3.0', 'reference' => 'a0645dc585d378b73c01115dd7ab9348f7d40c85', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v6.1.6', 'version' => '6.1.6.0', 'reference' => '7fa3b9cf17363468795e539231a5c91b02b608fc', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/contracts' => array('pretty_version' => 'v3.1.1', 'version' => '3.1.1.0', 'reference' => '8656c9e7f44435eaf428f2aa7f083c65297fb22f', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/dependency-injection' => array('pretty_version' => 'v6.1.5', 'version' => '6.1.5.0', 'reference' => 'b9c797c9d56afc290d4265854bafd01b4e379240', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/event-dispatcher-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/filesystem' => array('pretty_version' => 'v6.1.5', 'version' => '6.1.5.0', 'reference' => '4d216a2beef096edf040a070117c39ca2abce307', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.1.3', 'version' => '6.1.3.0', 'reference' => '39696bff2c2970b3779a5cac7bf9f0b88fc2b709', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/http-client-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), '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.26.0', 'version' => '1.26.0.0', 'reference' => '219aa369ceff116e673852dce47c3a41794c14bd', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', 'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/service-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0|3.0')), 'symfony/string' => array('pretty_version' => 'v6.1.6', 'version' => '6.1.6.0', 'reference' => '7e7e0ff180d4c5a6636eaad57b65092014b61864', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symplify/autowire-array-parameter' => array('pretty_version' => '11.1.16', 'version' => '11.1.16.0', 'reference' => 'd9dafca176d8676e9e102e0efb6f1ea8c634f898', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/autowire-array-parameter', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/easy-parallel' => array('pretty_version' => '11.1.16', 'version' => '11.1.16.0', 'reference' => 'd60b7d6975b44ecf34b8bb39c48872c0995acce1', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/easy-parallel', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '11.1.16', 'version' => '11.1.16.0', 'reference' => 'ccb4e3f30e61e7ebd8cabb6d8917347debee0c0c', '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.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.0.0', 'version' => '3.0.0.0', 'reference' => 'e300eb6c535192decd27a85bc72a9290f0d6b3bd', '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), '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.1', 'version' => '4.15.1.0', 'reference' => '0ef6c55a3f47f89d7a374e6f835197a0b5fcf900', '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.13.0', 'version' => '1.13.0.0', 'reference' => '33aefcdab42900e36366d0feab6206e2dd68f947', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan' => array('pretty_version' => '1.8.11', 'version' => '1.8.11.0', 'reference' => '46e223dd68a620da18855c23046ddb00940b4014', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan-phpunit' => array('pretty_version' => '1.2.2', 'version' => '1.2.2.0', 'reference' => 'dea1f87344c6964c607d9076dee42d891f3923f0', '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.1.1', 'version' => '1.1.1.0', 'reference' => '4bf736a2cccec7298bdf745db77585966fc2ca7e', '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' => '17bdb82a53af4f58dfb4c00634e8942e653bfaef', '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' => 'da1013feacd1f27dbd414734fd2768d9258a5f7b', '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' => '9c21f5f57464fc5af8765a1007eced8f7f62677c', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-php-parser', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-phpoffice' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '294de0ce80a9eb2c1b2d0d8e2762032dba0044e0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpoffice', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-phpunit' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '6fc267c6c82aa2980ebc8230b95e2039f957076c', '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' => '5f0c972b3cdeff3acfc1a17c9dbed1674023d2ac', '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.1.1')), 'symfony/config' => array('pretty_version' => 'v6.1.3', 'version' => '6.1.3.0', 'reference' => 'a0645dc585d378b73c01115dd7ab9348f7d40c85', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v6.1.7', 'version' => '6.1.7.0', 'reference' => 'a1282bd0c096e0bdb8800b104177e2ce404d8815', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/contracts' => array('pretty_version' => 'v3.1.1', 'version' => '3.1.1.0', 'reference' => '8656c9e7f44435eaf428f2aa7f083c65297fb22f', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/dependency-injection' => array('pretty_version' => 'v6.1.5', 'version' => '6.1.5.0', 'reference' => 'b9c797c9d56afc290d4265854bafd01b4e379240', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/event-dispatcher-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/filesystem' => array('pretty_version' => 'v6.1.5', 'version' => '6.1.5.0', 'reference' => '4d216a2beef096edf040a070117c39ca2abce307', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.1.3', 'version' => '6.1.3.0', 'reference' => '39696bff2c2970b3779a5cac7bf9f0b88fc2b709', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/http-client-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), '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.26.0', 'version' => '1.26.0.0', 'reference' => '219aa369ceff116e673852dce47c3a41794c14bd', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', 'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/service-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0|3.0')), 'symfony/string' => array('pretty_version' => 'v6.1.7', 'version' => '6.1.7.0', 'reference' => '823f143370880efcbdfa2dbca946b3358c4707e5', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symplify/autowire-array-parameter' => array('pretty_version' => '11.1.16', 'version' => '11.1.16.0', 'reference' => 'd9dafca176d8676e9e102e0efb6f1ea8c634f898', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/autowire-array-parameter', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/easy-parallel' => array('pretty_version' => '11.1.16', 'version' => '11.1.16.0', 'reference' => 'd60b7d6975b44ecf34b8bb39c48872c0995acce1', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/easy-parallel', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '11.1.16', 'version' => '11.1.16.0', 'reference' => 'ccb4e3f30e61e7ebd8cabb6d8917347debee0c0c', '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/phpstan/phpstan-phpunit/src/Rules/PHPUnit/CoversHelper.php b/vendor/phpstan/phpstan-phpunit/src/Rules/PHPUnit/CoversHelper.php index 8f6f7d694d6..becdd68f34f 100644 --- a/vendor/phpstan/phpstan-phpunit/src/Rules/PHPUnit/CoversHelper.php +++ b/vendor/phpstan/phpstan-phpunit/src/Rules/PHPUnit/CoversHelper.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace PHPStan\Rules\PHPUnit; use PhpParser\Node; +use PhpParser\Node\Name; use PHPStan\PhpDoc\ResolvedPhpDocBlock; use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode; use PHPStan\Reflection\ReflectionProvider; @@ -51,21 +52,27 @@ class CoversHelper { $errors = []; $covers = (string) $phpDocTag->value; - if (strpos($covers, '::') !== \false) { + $isMethod = strpos($covers, '::') !== \false; + $fullName = $covers; + if ($isMethod) { [$className, $method] = explode('::', $covers); } else { $className = $covers; } if ($className === '' && $node instanceof Node\Stmt\ClassMethod && $coversDefaultClass !== null) { $className = (string) $coversDefaultClass->value; + $fullName = $className . $covers; } if ($this->reflectionProvider->hasClass($className)) { $class = $this->reflectionProvider->getClass($className); if (isset($method) && $method !== '' && !$class->hasMethod($method)) { - $errors[] = RuleErrorBuilder::message(sprintf('@covers value %s references an invalid method.', $covers))->build(); + $errors[] = RuleErrorBuilder::message(sprintf('@covers value %s references an invalid method.', $fullName))->build(); } } else { - $errors[] = RuleErrorBuilder::message(sprintf('@covers value %s references an invalid class.', $covers))->build(); + if (!isset($method) && $this->reflectionProvider->hasFunction(new Name($covers, []), null)) { + return $errors; + } + $errors[] = RuleErrorBuilder::message(sprintf('@covers value %s references an invalid %s.', $fullName, $isMethod ? 'method' : 'class or function'))->build(); } return $errors; } diff --git a/vendor/rector/extension-installer/src/GeneratedConfig.php b/vendor/rector/extension-installer/src/GeneratedConfig.php index 020f1c9ce19..8544e2d0e68 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 17bdb82'), '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 da1013f'), '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 9c21f5f'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 294de0c'), '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 6fc267c'), '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 644c5a4')); + 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 17bdb82'), '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 da1013f'), '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 9c21f5f'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 294de0c'), '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 6fc267c'), '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 5f0c972')); private function __construct() { } diff --git a/vendor/rector/rector-symfony/config/sets/symfony/symfony51.php b/vendor/rector/rector-symfony/config/sets/symfony/symfony51.php index 6e8f6ba0609..64321dd637f 100644 --- a/vendor/rector/rector-symfony/config/sets/symfony/symfony51.php +++ b/vendor/rector/rector-symfony/config/sets/symfony/symfony51.php @@ -15,6 +15,7 @@ use Rector\Renaming\ValueObject\MethodCallRename; use Rector\Renaming\ValueObject\RenameClassAndConstFetch; use Rector\Symfony\Rector\Class_\LogoutHandlerToLogoutEventSubscriberRector; use Rector\Symfony\Rector\Class_\LogoutSuccessHandlerToLogoutEventSubscriberRector; +use Rector\Symfony\Rector\ClassMethod\CommandConstantReturnCodeRector; use Rector\Symfony\Rector\ClassMethod\RouteCollectionBuilderToRoutingConfiguratorRector; use Rector\Transform\Rector\New_\NewArgToMethodCallRector; use Rector\Transform\Rector\StaticCall\StaticCallToNewRector; @@ -34,6 +35,8 @@ return static function (RectorConfig $rectorConfig) : void { ]); $rectorConfig->ruleWithConfiguration(RenameMethodRector::class, [new MethodCallRename('Symfony\\Component\\Config\\Definition\\BaseNode', 'getDeprecationMessage', 'getDeprecation'), new MethodCallRename('Symfony\\Component\\DependencyInjection\\Definition', 'getDeprecationMessage', 'getDeprecation'), new MethodCallRename('Symfony\\Component\\DependencyInjection\\Alias', 'getDeprecationMessage', 'getDeprecation')]); $rectorConfig->ruleWithConfiguration(RenameFunctionRector::class, ['Symfony\\Component\\DependencyInjection\\Loader\\Configuraton\\inline' => 'Symfony\\Component\\DependencyInjection\\Loader\\Configuraton\\inline_service', 'Symfony\\Component\\DependencyInjection\\Loader\\Configuraton\\ref' => 'Symfony\\Component\\DependencyInjection\\Loader\\Configuraton\\service']); + // see https://symfony.com/blog/new-in-symfony-5-1-misc-improvements-part-1#added-constants-for-command-exit-codes + $rectorConfig->rule(CommandConstantReturnCodeRector::class); // https://github.com/symfony/symfony/pull/35308 $rectorConfig->ruleWithConfiguration(NewArgToMethodCallRector::class, [new NewArgToMethodCall('Symfony\\Component\\Dotenv\\Dotenv', \true, 'usePutenv')]); $rectorConfig->ruleWithConfiguration(RenameClassConstFetchRector::class, [new RenameClassAndConstFetch('Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\NumberToLocalizedStringTransformer', 'ROUND_FLOOR', 'NumberFormatter', 'ROUND_FLOOR'), new RenameClassAndConstFetch('Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\NumberToLocalizedStringTransformer', 'ROUND_DOWN', 'NumberFormatter', 'ROUND_DOWN'), new RenameClassAndConstFetch('Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\NumberToLocalizedStringTransformer', 'ROUND_HALF_DOWN', 'NumberFormatter', 'ROUND_HALFDOWN'), new RenameClassAndConstFetch('Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\NumberToLocalizedStringTransformer', 'ROUND_HALF_EVEN', 'NumberFormatter', 'ROUND_HALFEVEN'), new RenameClassAndConstFetch('Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\NumberToLocalizedStringTransformer', 'ROUND_HALFUP', 'NumberFormatter', 'ROUND_HALFUP'), new RenameClassAndConstFetch('Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\NumberToLocalizedStringTransformer', 'ROUND_UP', 'NumberFormatter', 'ROUND_UP'), new RenameClassAndConstFetch('Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\NumberToLocalizedStringTransformer', 'ROUND_CEILING', 'NumberFormatter', 'ROUND_CEILING')]); diff --git a/vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-112.php b/vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-112.php new file mode 100644 index 00000000000..f2d4e2cdc3d --- /dev/null +++ b/vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-112.php @@ -0,0 +1,10 @@ +sets([TwigSetList::TWIG_112]); +}; diff --git a/vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-127.php b/vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-127.php new file mode 100644 index 00000000000..6009dfff5d3 --- /dev/null +++ b/vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-127.php @@ -0,0 +1,11 @@ +sets([TwigSetList::TWIG_127, TwigLevelSetList::UP_TO_TWIG_112]); +}; diff --git a/vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-134.php b/vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-134.php new file mode 100644 index 00000000000..f540ec7874f --- /dev/null +++ b/vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-134.php @@ -0,0 +1,11 @@ +sets([TwigSetList::TWIG_134, TwigLevelSetList::UP_TO_TWIG_127]); +}; diff --git a/vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-140.php b/vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-140.php new file mode 100644 index 00000000000..1d8992451e4 --- /dev/null +++ b/vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-140.php @@ -0,0 +1,11 @@ +sets([TwigSetList::TWIG_140, TwigLevelSetList::UP_TO_TWIG_134]); +}; diff --git a/vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-20.php b/vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-20.php new file mode 100644 index 00000000000..94b6fa22404 --- /dev/null +++ b/vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-20.php @@ -0,0 +1,11 @@ +sets([TwigSetList::TWIG_20, TwigLevelSetList::UP_TO_TWIG_140]); +}; diff --git a/vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-240.php b/vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-240.php new file mode 100644 index 00000000000..646434e2d0f --- /dev/null +++ b/vendor/rector/rector-symfony/config/sets/twig/level/up-to-twig-240.php @@ -0,0 +1,11 @@ +sets([TwigSetList::TWIG_240, TwigLevelSetList::UP_TO_TWIG_20]); +}; diff --git a/vendor/rector/rector-symfony/docs/rector_rules_overview.md b/vendor/rector/rector-symfony/docs/rector_rules_overview.md index 034e41a6555..a17733f3403 100644 --- a/vendor/rector/rector-symfony/docs/rector_rules_overview.md +++ b/vendor/rector/rector-symfony/docs/rector_rules_overview.md @@ -251,6 +251,28 @@ Change type in CollectionType from alias string to class reference
+## CommandConstantReturnCodeRector + +Changes int return from execute to use Symfony Command constants. + +- +class: [`Rector\Symfony\Rector\ClassMethod\CommandConstantReturnCodeRector`](../src/Rector/ClassMethod/CommandConstantReturnCodeRector.php) + +```diff + use Symfony\Component\Console\Command\Command; + + class SomeCommand extends Command + { + protected function execute(InputInterface $input, OutputInterface $output): int + { +- return 0; ++ return Command::SUCCESS; + } + } +``` + +
+ ## CommandDescriptionToPropertyRector Moves Command description setter to defaultDescription property diff --git a/vendor/rector/rector-symfony/src/Rector/ClassMethod/CommandConstantReturnCodeRector.php b/vendor/rector/rector-symfony/src/Rector/ClassMethod/CommandConstantReturnCodeRector.php new file mode 100644 index 00000000000..9a21f4c98e5 --- /dev/null +++ b/vendor/rector/rector-symfony/src/Rector/ClassMethod/CommandConstantReturnCodeRector.php @@ -0,0 +1,97 @@ +reflectionResolver = $reflectionResolver; + } + public function getRuleDefinition() : RuleDefinition + { + return new RuleDefinition('Changes int return from execute to use Symfony Command constants.', [new CodeSample(<<<'CODE_SAMPLE' +class SomeCommand extends Command +{ + protected function execute(InputInterface $input, OutputInterface $output): int + { + return 0; + } + +} +CODE_SAMPLE +, <<<'CODE_SAMPLE' +class SomeCommand extends Command +{ + protected function execute(InputInterface $input, OutputInterface $output): int + { + return Command::SUCCESS; + } + +} +CODE_SAMPLE +)]); + } + /** + * @return array> + */ + public function getNodeTypes() : array + { + return [ClassMethod::class]; + } + /** + * @param ClassMethod $node + */ + public function refactor(Node $node) : ?Node + { + $classReflection = $this->reflectionResolver->resolveClassReflection($node); + if (!$classReflection instanceof ClassReflection) { + return null; + } + if (!$classReflection->isSubclassOf('Symfony\\Component\\Console\\Command\\Command')) { + return null; + } + if (!$this->nodeNameResolver->isName($node, 'execute')) { + return null; + } + foreach ($this->betterNodeFinder->findInstancesOfInFunctionLikeScoped($node, [Return_::class]) as $returnNode) { + if (!$returnNode->expr instanceof LNumber) { + continue; + } + $returnNode->expr = $this->convertNumberToConstant($returnNode->expr); + } + return $node; + } + /** + * @return \PhpParser\Node\Expr\ClassConstFetch|\PhpParser\Node\Scalar\LNumber + */ + private function convertNumberToConstant(LNumber $lNumber) + { + if (!isset(SymfonyCommandConstantMap::RETURN_TO_CONST[$lNumber->value])) { + return $lNumber; + } + return $this->nodeFactory->createShortClassConstFetch('Command', SymfonyCommandConstantMap::RETURN_TO_CONST[$lNumber->value]); + } +} diff --git a/vendor/rector/rector-symfony/src/Rector/ClassMethod/MergeMethodAnnotationToRouteAnnotationRector.php b/vendor/rector/rector-symfony/src/Rector/ClassMethod/MergeMethodAnnotationToRouteAnnotationRector.php index bc2dd494faf..0b6b4a9c7b6 100644 --- a/vendor/rector/rector-symfony/src/Rector/ClassMethod/MergeMethodAnnotationToRouteAnnotationRector.php +++ b/vendor/rector/rector-symfony/src/Rector/ClassMethod/MergeMethodAnnotationToRouteAnnotationRector.php @@ -4,6 +4,7 @@ declare (strict_types=1); namespace Rector\Symfony\Rector\ClassMethod; use PhpParser\Node; +use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\ClassLike; use PhpParser\Node\Stmt\ClassMethod; use Rector\BetterPhpDocParser\PhpDoc\ArrayItemNode; @@ -102,8 +103,11 @@ CODE_SAMPLE if ($sensioMethods === null) { return null; } + if (\is_string($sensioMethods)) { + $sensioMethods = new CurlyListNode([new ArrayItemNode($sensioMethods, null, String_::KIND_DOUBLE_QUOTED)]); + } $symfonyMethodsArrayItemNode = $symfonyDoctrineAnnotationTagValueNode->getValue('methods'); - // value is already filled, do not enter anythign + // value is already filled, do not enter anything if ($symfonyMethodsArrayItemNode instanceof ArrayItemNode) { return null; } @@ -113,7 +117,7 @@ CODE_SAMPLE return $node; } /** - * @return string[]|null|CurlyListNode + * @return string|string[]|null|CurlyListNode */ private function resolveMethods(DoctrineAnnotationTagValueNode $doctrineAnnotationTagValueNode) { diff --git a/vendor/rector/rector-symfony/src/Set/TwigLevelSetList.php b/vendor/rector/rector-symfony/src/Set/TwigLevelSetList.php new file mode 100644 index 00000000000..a5e7ab36954 --- /dev/null +++ b/vendor/rector/rector-symfony/src/Set/TwigLevelSetList.php @@ -0,0 +1,33 @@ + + */ + public const RETURN_TO_CONST = [0 => 'SUCCESS', 1 => 'FAILURE', 2 => 'INVALID']; +} diff --git a/vendor/rector/rector-symfony/src/ValueObject/ConstantMap/SymfonyResponseConstantMap.php b/vendor/rector/rector-symfony/src/ValueObject/ConstantMap/SymfonyResponseConstantMap.php index 7daa48a22b1..d735dcd748c 100644 --- a/vendor/rector/rector-symfony/src/ValueObject/ConstantMap/SymfonyResponseConstantMap.php +++ b/vendor/rector/rector-symfony/src/ValueObject/ConstantMap/SymfonyResponseConstantMap.php @@ -6,6 +6,8 @@ namespace Rector\Symfony\ValueObject\ConstantMap; final class SymfonyResponseConstantMap { /** + * @see https://github.com/symfony/symfony/blob/8e8207bb72d7f2cb8be355994ad2fcfa97c00f74/src/Symfony/Component/HttpFoundation/Response.php#L24-L86 + * * @var array */ public const CODE_TO_CONST = [100 => 'HTTP_CONTINUE', 101 => 'HTTP_SWITCHING_PROTOCOLS', 102 => 'HTTP_PROCESSING', 103 => 'HTTP_EARLY_HINTS', 200 => 'HTTP_OK', 201 => 'HTTP_CREATED', 202 => 'HTTP_ACCEPTED', 203 => 'HTTP_NON_AUTHORITATIVE_INFORMATION', 204 => 'HTTP_NO_CONTENT', 205 => 'HTTP_RESET_CONTENT', 206 => 'HTTP_PARTIAL_CONTENT', 207 => 'HTTP_MULTI_STATUS', 208 => 'HTTP_ALREADY_REPORTED', 226 => 'HTTP_IM_USED', 300 => 'HTTP_MULTIPLE_CHOICES', 301 => 'HTTP_MOVED_PERMANENTLY', 302 => 'HTTP_FOUND', 303 => 'HTTP_SEE_OTHER', 304 => 'HTTP_NOT_MODIFIED', 305 => 'HTTP_USE_PROXY', 306 => 'HTTP_RESERVED', 307 => 'HTTP_TEMPORARY_REDIRECT', 308 => 'HTTP_PERMANENTLY_REDIRECT', 400 => 'HTTP_BAD_REQUEST', 401 => 'HTTP_UNAUTHORIZED', 402 => 'HTTP_PAYMENT_REQUIRED', 403 => 'HTTP_FORBIDDEN', 404 => 'HTTP_NOT_FOUND', 405 => 'HTTP_METHOD_NOT_ALLOWED', 406 => 'HTTP_NOT_ACCEPTABLE', 407 => 'HTTP_PROXY_AUTHENTICATION_REQUIRED', 408 => 'HTTP_REQUEST_TIMEOUT', 409 => 'HTTP_CONFLICT', 410 => 'HTTP_GONE', 411 => 'HTTP_LENGTH_REQUIRED', 412 => 'HTTP_PRECONDITION_FAILED', 413 => 'HTTP_REQUEST_ENTITY_TOO_LARGE', 414 => 'HTTP_REQUEST_URI_TOO_LONG', 415 => 'HTTP_UNSUPPORTED_MEDIA_TYPE', 416 => 'HTTP_REQUESTED_RANGE_NOT_SATISFIABLE', 417 => 'HTTP_EXPECTATION_FAILED', 418 => 'HTTP_I_AM_A_TEAPOT', 421 => 'HTTP_MISDIRECTED_REQUEST', 422 => 'HTTP_UNPROCESSABLE_ENTITY', 423 => 'HTTP_LOCKED', 424 => 'HTTP_FAILED_DEPENDENCY', 425 => 'HTTP_TOO_EARLY', 426 => 'HTTP_UPGRADE_REQUIRED', 428 => 'HTTP_PRECONDITION_REQUIRED', 429 => 'HTTP_TOO_MANY_REQUESTS', 431 => 'HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE', 451 => 'HTTP_UNAVAILABLE_FOR_LEGAL_REASONS', 500 => 'HTTP_INTERNAL_SERVER_ERROR', 501 => 'HTTP_NOT_IMPLEMENTED', 502 => 'HTTP_BAD_GATEWAY', 503 => 'HTTP_SERVICE_UNAVAILABLE', 504 => 'HTTP_GATEWAY_TIMEOUT', 505 => 'HTTP_VERSION_NOT_SUPPORTED', 506 => 'HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL', 507 => 'HTTP_INSUFFICIENT_STORAGE', 508 => 'HTTP_LOOP_DETECTED', 510 => 'HTTP_NOT_EXTENDED', 511 => 'HTTP_NETWORK_AUTHENTICATION_REQUIRED']; diff --git a/vendor/symfony/console/Application.php b/vendor/symfony/console/Application.php index d4946c1ef17..8b687b1c636 100644 --- a/vendor/symfony/console/Application.php +++ b/vendor/symfony/console/Application.php @@ -292,7 +292,9 @@ class Application implements ResetInterface } $alternative = $alternatives[0]; $style = new SymfonyStyle($input, $output); - $style->block(\sprintf("\nCommand \"%s\" is not defined.\n", $name), null, 'error'); + $output->writeln(''); + $formattedBlock = (new FormatterHelper())->formatBlock(\sprintf('Command "%s" is not defined.', $name), 'error', \true); + $output->writeln($formattedBlock); if (!$style->confirm(\sprintf('Do you want to run "%s" instead? ', $alternative), \false)) { if (null !== $this->dispatcher) { $event = new ConsoleErrorEvent($input, $output, $e);