diff --git a/packages/BetterPhpDocParser/PhpDoc/DoctrineAnnotationTagValueNode.php b/packages/BetterPhpDocParser/PhpDoc/DoctrineAnnotationTagValueNode.php index f65d894eaf60..875f67726e7a 100644 --- a/packages/BetterPhpDocParser/PhpDoc/DoctrineAnnotationTagValueNode.php +++ b/packages/BetterPhpDocParser/PhpDoc/DoctrineAnnotationTagValueNode.php @@ -58,7 +58,7 @@ public function hasClassName(string $className) : bool if ($annotationName === $className) { return \true; } - // the name is not fully qualified in the original name, look for resolvd class attirubte + // the name is not fully qualified in the original name, look for resolved class attribute $resolvedClass = $this->identifierTypeNode->getAttribute(\Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey::RESOLVED_CLASS); return $resolvedClass === $className; } diff --git a/packages/BetterPhpDocParser/PhpDocParser/DoctrineAnnotationDecorator.php b/packages/BetterPhpDocParser/PhpDocParser/DoctrineAnnotationDecorator.php index 5418b03a1a68..548cdbde395c 100644 --- a/packages/BetterPhpDocParser/PhpDocParser/DoctrineAnnotationDecorator.php +++ b/packages/BetterPhpDocParser/PhpDocParser/DoctrineAnnotationDecorator.php @@ -6,6 +6,7 @@ use RectorPrefix20211120\Nette\Utils\Strings; use PhpParser\Node; use PHPStan\PhpDocParser\Ast\PhpDoc\GenericTagValueNode; +use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocChildNode; use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode; use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode; use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTextNode; @@ -32,6 +33,11 @@ final class DoctrineAnnotationDecorator * @var string */ private const LONG_ANNOTATION_REGEX = '#@\\\\(?.*?)(?\\(.*?\\))#'; + /** + * @see https://regex101.com/r/xWaLOz/1 + * @var string + */ + private const NESTED_ANNOTATION_END_REGEX = '#(\\s+)?\\}\\)(\\s+)?#'; /** * @var \Rector\Core\Configuration\CurrentNodeProvider */ @@ -94,6 +100,17 @@ private function mergeNestedDoctrineAnnotations(\PHPStan\PhpDocParser\Ast\PhpDoc break; } $nextPhpDocChildNode = $phpDocNode->children[$key]; + if ($nextPhpDocChildNode instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTextNode && \RectorPrefix20211120\Nette\Utils\Strings::match($nextPhpDocChildNode->text, self::NESTED_ANNOTATION_END_REGEX)) { + // @todo how to detect previously opened brackets? + // probably local property with holding count of opened brackets + $composedContent = $genericTagValueNode->value . \PHP_EOL . $nextPhpDocChildNode->text; + $genericTagValueNode->value = $composedContent; + $startAndEnd = $this->combineStartAndEnd($phpDocChildNode, $nextPhpDocChildNode); + $phpDocChildNode->setAttribute(\Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey::START_AND_END, $startAndEnd); + $removedKeys[] = $key; + $removedKeys[] = $key + 1; + continue; + } if (!$nextPhpDocChildNode instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode) { continue; } @@ -103,13 +120,10 @@ private function mergeNestedDoctrineAnnotations(\PHPStan\PhpDocParser\Ast\PhpDoc if ($this->isClosedContent($genericTagValueNode->value)) { break; } - $composedContent = $genericTagValueNode->value . \PHP_EOL . $nextPhpDocChildNode->name . $nextPhpDocChildNode->value; + $composedContent = $genericTagValueNode->value . \PHP_EOL . $nextPhpDocChildNode->name . $nextPhpDocChildNode->value->value; + // cleanup the next from closing $genericTagValueNode->value = $composedContent; - /** @var StartAndEnd $currentStartAndEnd */ - $currentStartAndEnd = $phpDocChildNode->getAttribute(\Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey::START_AND_END); - /** @var StartAndEnd $nextStartAndEnd */ - $nextStartAndEnd = $nextPhpDocChildNode->getAttribute(\Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey::START_AND_END); - $startAndEnd = new \Rector\BetterPhpDocParser\ValueObject\StartAndEnd($currentStartAndEnd->getStart(), $nextStartAndEnd->getEnd()); + $startAndEnd = $this->combineStartAndEnd($phpDocChildNode, $nextPhpDocChildNode); $phpDocChildNode->setAttribute(\Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey::START_AND_END, $startAndEnd); $currentChildValueNode = $phpDocNode->children[$key]; if (!$currentChildValueNode instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode) { @@ -134,15 +148,10 @@ private function transformGenericTagValueNodesToDoctrineAnnotationTagValueNodes( foreach ($phpDocNode->children as $key => $phpDocChildNode) { // the @\FQN use case if ($phpDocChildNode instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTextNode) { - $match = \RectorPrefix20211120\Nette\Utils\Strings::match($phpDocChildNode->text, self::LONG_ANNOTATION_REGEX); - $fullyQualifiedAnnotationClass = $match['class_name'] ?? null; - if ($fullyQualifiedAnnotationClass === null) { + $spacelessPhpDocTagNode = $this->resolveFqnAnnotationSpacelessPhpDocTagNode($phpDocChildNode); + if (!$spacelessPhpDocTagNode instanceof \Rector\BetterPhpDocParser\PhpDoc\SpacelessPhpDocTagNode) { continue; } - $annotationContent = $match['annotation_content'] ?? null; - $tagName = '@\\' . $fullyQualifiedAnnotationClass; - $formerStartEnd = $phpDocChildNode->getAttribute(\Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey::START_AND_END); - $spacelessPhpDocTagNode = $this->createDoctrineSpacelessPhpDocTagNode($annotationContent, $tagName, $fullyQualifiedAnnotationClass, $formerStartEnd); $phpDocNode->children[$key] = $spacelessPhpDocTagNode; continue; } @@ -205,4 +214,24 @@ private function createDoctrineSpacelessPhpDocTagNode(string $annotationContent, $doctrineAnnotationTagValueNode->setAttribute(\Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey::START_AND_END, $startAndEnd); return new \Rector\BetterPhpDocParser\PhpDoc\SpacelessPhpDocTagNode($tagName, $doctrineAnnotationTagValueNode); } + private function combineStartAndEnd(\PHPStan\PhpDocParser\Ast\Node $startPhpDocChildNode, \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocChildNode $endPhpDocChildNode) : \Rector\BetterPhpDocParser\ValueObject\StartAndEnd + { + /** @var StartAndEnd $currentStartAndEnd */ + $currentStartAndEnd = $startPhpDocChildNode->getAttribute(\Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey::START_AND_END); + /** @var StartAndEnd $nextStartAndEnd */ + $nextStartAndEnd = $endPhpDocChildNode->getAttribute(\Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey::START_AND_END); + return new \Rector\BetterPhpDocParser\ValueObject\StartAndEnd($currentStartAndEnd->getStart(), $nextStartAndEnd->getEnd()); + } + private function resolveFqnAnnotationSpacelessPhpDocTagNode(\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTextNode $phpDocTextNode) : ?\Rector\BetterPhpDocParser\PhpDoc\SpacelessPhpDocTagNode + { + $match = \RectorPrefix20211120\Nette\Utils\Strings::match($phpDocTextNode->text, self::LONG_ANNOTATION_REGEX); + $fullyQualifiedAnnotationClass = $match['class_name'] ?? null; + if ($fullyQualifiedAnnotationClass === null) { + return null; + } + $annotationContent = $match['annotation_content'] ?? null; + $tagName = '@\\' . $fullyQualifiedAnnotationClass; + $formerStartEnd = $phpDocTextNode->getAttribute(\Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey::START_AND_END); + return $this->createDoctrineSpacelessPhpDocTagNode($annotationContent, $tagName, $fullyQualifiedAnnotationClass, $formerStartEnd); + } } diff --git a/packages/PhpAttribute/Exception/InvalidNestedAttributeException.php b/packages/PhpAttribute/Exception/InvalidNestedAttributeException.php new file mode 100644 index 000000000000..50e051adaa4c --- /dev/null +++ b/packages/PhpAttribute/Exception/InvalidNestedAttributeException.php @@ -0,0 +1,9 @@ +normalizeStringDoubleQuote($silentValue); + $silentValue = $this->mapAnnotationValueToAttribute($items[$silentKey]); $args[] = new \PhpParser\Node\Arg($silentValue); unset($items[$silentKey]); } foreach ($items as $key => $value) { - $value = $this->valueNormalizer->normalize($value); - $value = \PhpParser\BuilderHelpers::normalizeValue($value); - $this->normalizeStringDoubleQuote($value); + $value = $this->mapAnnotationValueToAttribute($value); $name = null; if (\is_string($key)) { $name = new \PhpParser\Node\Identifier($key); @@ -136,4 +133,14 @@ private function completeNamedArguments(array $args, array $argumentNames) : voi $arg->name = new \PhpParser\Node\Identifier($argumentName); } } + /** + * @param mixed $annotationValue + */ + private function mapAnnotationValueToAttribute($annotationValue) : \PhpParser\Node\Expr + { + $value = $this->valueNormalizer->normalize($annotationValue); + $value = \PhpParser\BuilderHelpers::normalizeValue($value); + $this->normalizeStringDoubleQuote($value); + return $value; + } } diff --git a/packages/PhpAttribute/Value/ValueNormalizer.php b/packages/PhpAttribute/Value/ValueNormalizer.php index 7a00a4da2a33..543eaa5613ce 100644 --- a/packages/PhpAttribute/Value/ValueNormalizer.php +++ b/packages/PhpAttribute/Value/ValueNormalizer.php @@ -5,33 +5,44 @@ use PhpParser\Node\Expr; use PhpParser\Node\Expr\ClassConstFetch; +use PhpParser\Node\Expr\New_; use PhpParser\Node\Name; +use PhpParser\Node\Name\FullyQualified; use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprFalseNode; use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprIntegerNode; +use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode; use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprTrueNode; use PHPStan\PhpDocParser\Ast\Node; use PHPStan\Type\Constant\ConstantBooleanType; use PHPStan\Type\Constant\ConstantFloatType; +use Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode; use Rector\BetterPhpDocParser\ValueObject\PhpDoc\DoctrineAnnotation\CurlyListNode; +use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey; +use Rector\Core\Exception\ShouldNotHappenException; +use Rector\Core\Php\PhpVersionProvider; +use Rector\Core\ValueObject\PhpVersionFeature; +use Rector\PhpAttribute\Exception\InvalidNestedAttributeException; final class ValueNormalizer { + /** + * @var \Rector\Core\Php\PhpVersionProvider + */ + private $phpVersionProvider; + public function __construct(\Rector\Core\Php\PhpVersionProvider $phpVersionProvider) + { + $this->phpVersionProvider = $phpVersionProvider; + } /** * @param mixed $value * @return mixed[]|bool|float|int|\PhpParser\Node\Expr|string */ public function normalize($value) { - if ($value instanceof \PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprIntegerNode) { - return (int) $value->value; - } - if ($value instanceof \PHPStan\Type\Constant\ConstantFloatType || $value instanceof \PHPStan\Type\Constant\ConstantBooleanType) { - return $value->getValue(); + if ($value instanceof \Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode) { + return $this->normalizeDoctrineAnnotationTagValueNode($value); } - if ($value instanceof \PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprTrueNode) { - return \true; - } - if ($value instanceof \PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprFalseNode) { - return \false; + if ($value instanceof \PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode) { + return $this->normalizeConstrExprNode($value); } if ($value instanceof \Rector\BetterPhpDocParser\ValueObject\PhpDoc\DoctrineAnnotation\CurlyListNode) { return \array_map(function ($node) { @@ -53,4 +64,32 @@ public function normalize($value) } return $value; } + private function normalizeDoctrineAnnotationTagValueNode(\Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode $doctrineAnnotationTagValueNode) : \PhpParser\Node\Expr\New_ + { + // if PHP 8.0- throw exception + if (!$this->phpVersionProvider->isAtLeastPhpVersion(\Rector\Core\ValueObject\PhpVersionFeature::NEW_INITIALIZERS)) { + throw new \Rector\PhpAttribute\Exception\InvalidNestedAttributeException(); + } + $resolveClass = $doctrineAnnotationTagValueNode->identifierTypeNode->getAttribute(\Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey::RESOLVED_CLASS); + return new \PhpParser\Node\Expr\New_(new \PhpParser\Node\Name\FullyQualified($resolveClass)); + } + /** + * @return bool|float|int + */ + private function normalizeConstrExprNode(\PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode $constExprNode) + { + if ($constExprNode instanceof \PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprIntegerNode) { + return (int) $constExprNode->value; + } + if ($constExprNode instanceof \PHPStan\Type\Constant\ConstantFloatType || $constExprNode instanceof \PHPStan\Type\Constant\ConstantBooleanType) { + return $constExprNode->getValue(); + } + if ($constExprNode instanceof \PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprTrueNode) { + return \true; + } + if ($constExprNode instanceof \PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprFalseNode) { + return \false; + } + throw new \Rector\Core\Exception\ShouldNotHappenException(); + } } diff --git a/rules/Php80/Rector/Class_/AnnotationToAttributeRector.php b/rules/Php80/Rector/Class_/AnnotationToAttributeRector.php index 26c20ac5f172..6b1b49100c4c 100644 --- a/rules/Php80/Rector/Class_/AnnotationToAttributeRector.php +++ b/rules/Php80/Rector/Class_/AnnotationToAttributeRector.php @@ -185,20 +185,32 @@ private function processDoctrineAnnotationClasses(\Rector\BetterPhpDocParser\Php if (!$phpDocChildNode->value instanceof \Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode) { continue; } - $nestedDoctrineAnnotationTagValueNodes = $this->phpDocNodeFinder->findByType($phpDocChildNode->value, \Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode::class); - // depends on PHP 8.1+ - nested values, skip for now - if ($nestedDoctrineAnnotationTagValueNodes !== []) { + $doctrineTagValueNode = $phpDocChildNode->value; + $annotationToAttribute = $this->matchAnnotationToAttribute($doctrineTagValueNode); + if (!$annotationToAttribute instanceof \Rector\Php80\ValueObject\AnnotationToAttribute) { continue; } - $doctrineTagValueNode = $phpDocChildNode->value; - foreach ($this->annotationsToAttributes as $annotationToAttribute) { - if (!$doctrineTagValueNode->hasClassName($annotationToAttribute->getTag())) { - continue; - } - $doctrineTagAndAnnotationToAttributes[] = new \Rector\Php80\ValueObject\DoctrineTagAndAnnotationToAttribute($phpDocChildNode->value, $annotationToAttribute); - $this->phpDocTagRemover->removeTagValueFromNode($phpDocInfo, $doctrineTagValueNode); + $nestedDoctrineAnnotationTagValueNodes = $this->phpDocNodeFinder->findByType($doctrineTagValueNode, \Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode::class); + // depends on PHP 8.1+ - nested values, skip for now + if ($nestedDoctrineAnnotationTagValueNodes !== [] && !$this->phpVersionProvider->isAtLeastPhpVersion(\Rector\Core\ValueObject\PhpVersionFeature::NEW_INITIALIZERS)) { + continue; } + $doctrineTagAndAnnotationToAttributes[] = new \Rector\Php80\ValueObject\DoctrineTagAndAnnotationToAttribute($doctrineTagValueNode, $annotationToAttribute); + $this->phpDocTagRemover->removeTagValueFromNode($phpDocInfo, $doctrineTagValueNode); } return $this->attrGroupsFactory->create($doctrineTagAndAnnotationToAttributes); } + /** + * @return \Rector\Php80\ValueObject\AnnotationToAttribute|null + */ + private function matchAnnotationToAttribute(\Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode $doctrineAnnotationTagValueNode) + { + foreach ($this->annotationsToAttributes as $annotationToAttribute) { + if (!$doctrineAnnotationTagValueNode->hasClassName($annotationToAttribute->getTag())) { + continue; + } + return $annotationToAttribute; + } + return null; + } } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 7a4fa3dc8b71..4f30dc5dafac 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -16,11 +16,11 @@ final class VersionResolver /** * @var string */ - public const PACKAGE_VERSION = '60c06a7fbf77a7ad89e1c7a52114abd6ccc47883'; + public const PACKAGE_VERSION = 'f83d7441580e6175556328ac94dc7f128d2344aa'; /** * @var string */ - public const RELEASE_DATE = '2021-11-20 13:28:26'; + public const RELEASE_DATE = '2021-11-20 11:28:47'; public static function resolvePackageVersion() : string { $process = new \RectorPrefix20211120\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__); diff --git a/vendor/autoload.php b/vendor/autoload.php index 63448f9d4c44..6d59ed138070 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInitfb0bded2fb82879630a4e95c496b376e::getLoader(); +return ComposerAutoloaderInit0063f93cd2df74c27fe1b0639d1d2de1::getLoader(); diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index eed0bffaff7b..b5aa15289c6c 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -2511,6 +2511,7 @@ 'Rector\\Php81\\Rector\\FunctionLike\\IntersectionTypesRector' => $baseDir . '/rules/Php81/Rector/FunctionLike/IntersectionTypesRector.php', 'Rector\\Php81\\Rector\\MethodCall\\MyCLabsMethodCallToEnumConstRector' => $baseDir . '/rules/Php81/Rector/MethodCall/MyCLabsMethodCallToEnumConstRector.php', 'Rector\\Php81\\Rector\\Property\\ReadOnlyPropertyRector' => $baseDir . '/rules/Php81/Rector/Property/ReadOnlyPropertyRector.php', + 'Rector\\PhpAttribute\\Exception\\InvalidNestedAttributeException' => $baseDir . '/packages/PhpAttribute/Exception/InvalidNestedAttributeException.php', 'Rector\\PhpAttribute\\NodeAnalyzer\\NamedArgumentsResolver' => $baseDir . '/packages/PhpAttribute/NodeAnalyzer/NamedArgumentsResolver.php', 'Rector\\PhpAttribute\\Printer\\DoctrineAnnotationFactory' => $baseDir . '/packages/PhpAttribute/Printer/DoctrineAnnotationFactory.php', 'Rector\\PhpAttribute\\Printer\\PhpAttributeGroupFactory' => $baseDir . '/packages/PhpAttribute/Printer/PhpAttributeGroupFactory.php', diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 3c8bb29fc494..4c945aea6ef6 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitfb0bded2fb82879630a4e95c496b376e +class ComposerAutoloaderInit0063f93cd2df74c27fe1b0639d1d2de1 { private static $loader; @@ -22,15 +22,15 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitfb0bded2fb82879630a4e95c496b376e', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit0063f93cd2df74c27fe1b0639d1d2de1', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); - spl_autoload_unregister(array('ComposerAutoloaderInitfb0bded2fb82879630a4e95c496b376e', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit0063f93cd2df74c27fe1b0639d1d2de1', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInitfb0bded2fb82879630a4e95c496b376e::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit0063f93cd2df74c27fe1b0639d1d2de1::getInitializer($loader)); } else { $classMap = require __DIR__ . '/autoload_classmap.php'; if ($classMap) { @@ -42,19 +42,19 @@ public static function getLoader() $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInitfb0bded2fb82879630a4e95c496b376e::$files; + $includeFiles = Composer\Autoload\ComposerStaticInit0063f93cd2df74c27fe1b0639d1d2de1::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequirefb0bded2fb82879630a4e95c496b376e($fileIdentifier, $file); + composerRequire0063f93cd2df74c27fe1b0639d1d2de1($fileIdentifier, $file); } return $loader; } } -function composerRequirefb0bded2fb82879630a4e95c496b376e($fileIdentifier, $file) +function composerRequire0063f93cd2df74c27fe1b0639d1d2de1($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index b4575c4845c6..c12869c21c00 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInitfb0bded2fb82879630a4e95c496b376e +class ComposerStaticInit0063f93cd2df74c27fe1b0639d1d2de1 { public static $files = array ( 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', @@ -2851,6 +2851,7 @@ class ComposerStaticInitfb0bded2fb82879630a4e95c496b376e 'Rector\\Php81\\Rector\\FunctionLike\\IntersectionTypesRector' => __DIR__ . '/../..' . '/rules/Php81/Rector/FunctionLike/IntersectionTypesRector.php', 'Rector\\Php81\\Rector\\MethodCall\\MyCLabsMethodCallToEnumConstRector' => __DIR__ . '/../..' . '/rules/Php81/Rector/MethodCall/MyCLabsMethodCallToEnumConstRector.php', 'Rector\\Php81\\Rector\\Property\\ReadOnlyPropertyRector' => __DIR__ . '/../..' . '/rules/Php81/Rector/Property/ReadOnlyPropertyRector.php', + 'Rector\\PhpAttribute\\Exception\\InvalidNestedAttributeException' => __DIR__ . '/../..' . '/packages/PhpAttribute/Exception/InvalidNestedAttributeException.php', 'Rector\\PhpAttribute\\NodeAnalyzer\\NamedArgumentsResolver' => __DIR__ . '/../..' . '/packages/PhpAttribute/NodeAnalyzer/NamedArgumentsResolver.php', 'Rector\\PhpAttribute\\Printer\\DoctrineAnnotationFactory' => __DIR__ . '/../..' . '/packages/PhpAttribute/Printer/DoctrineAnnotationFactory.php', 'Rector\\PhpAttribute\\Printer\\PhpAttributeGroupFactory' => __DIR__ . '/../..' . '/packages/PhpAttribute/Printer/PhpAttributeGroupFactory.php', @@ -3582,9 +3583,9 @@ class ComposerStaticInitfb0bded2fb82879630a4e95c496b376e public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitfb0bded2fb82879630a4e95c496b376e::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitfb0bded2fb82879630a4e95c496b376e::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInitfb0bded2fb82879630a4e95c496b376e::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit0063f93cd2df74c27fe1b0639d1d2de1::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit0063f93cd2df74c27fe1b0639d1d2de1::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit0063f93cd2df74c27fe1b0639d1d2de1::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/scoper-autoload.php b/vendor/scoper-autoload.php index d196006d6db0..9eee57196493 100644 --- a/vendor/scoper-autoload.php +++ b/vendor/scoper-autoload.php @@ -12,8 +12,8 @@ if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) { spl_autoload_call('RectorPrefix20211120\AutoloadIncluder'); } -if (!class_exists('ComposerAutoloaderInitfb0bded2fb82879630a4e95c496b376e', false) && !interface_exists('ComposerAutoloaderInitfb0bded2fb82879630a4e95c496b376e', false) && !trait_exists('ComposerAutoloaderInitfb0bded2fb82879630a4e95c496b376e', false)) { - spl_autoload_call('RectorPrefix20211120\ComposerAutoloaderInitfb0bded2fb82879630a4e95c496b376e'); +if (!class_exists('ComposerAutoloaderInit0063f93cd2df74c27fe1b0639d1d2de1', false) && !interface_exists('ComposerAutoloaderInit0063f93cd2df74c27fe1b0639d1d2de1', false) && !trait_exists('ComposerAutoloaderInit0063f93cd2df74c27fe1b0639d1d2de1', false)) { + spl_autoload_call('RectorPrefix20211120\ComposerAutoloaderInit0063f93cd2df74c27fe1b0639d1d2de1'); } if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) { spl_autoload_call('RectorPrefix20211120\Helmich\TypoScriptParser\Parser\AST\Statement'); @@ -81,9 +81,9 @@ function print_node() { return \RectorPrefix20211120\print_node(...func_get_args()); } } -if (!function_exists('composerRequirefb0bded2fb82879630a4e95c496b376e')) { - function composerRequirefb0bded2fb82879630a4e95c496b376e() { - return \RectorPrefix20211120\composerRequirefb0bded2fb82879630a4e95c496b376e(...func_get_args()); +if (!function_exists('composerRequire0063f93cd2df74c27fe1b0639d1d2de1')) { + function composerRequire0063f93cd2df74c27fe1b0639d1d2de1() { + return \RectorPrefix20211120\composerRequire0063f93cd2df74c27fe1b0639d1d2de1(...func_get_args()); } } if (!function_exists('parseArgs')) {