mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-22 08:25:02 +02:00
Updated Rector to commit 92ff716761e19c7f30bd68065af7eeefac0480de
92ff716761
Improve string support in Doctrine Annotations (#3645)
This commit is contained in:
parent
94475b36c9
commit
3dc5be2274
@ -17,39 +17,23 @@ final class ArrayItemNode implements PhpDocTagValueNode
|
||||
/**
|
||||
* @var mixed
|
||||
*/
|
||||
public $key;
|
||||
public $key = null;
|
||||
/**
|
||||
* @var String_::KIND_*|null
|
||||
*/
|
||||
public $kindValueQuoted = null;
|
||||
/**
|
||||
* @var int|null
|
||||
*/
|
||||
public $kindKeyQuoted = null;
|
||||
/**
|
||||
* @param String_::KIND_*|null $kindValueQuoted
|
||||
* @param mixed $value
|
||||
* @param mixed $key
|
||||
*/
|
||||
public function __construct($value, $key, ?int $kindValueQuoted = null, ?int $kindKeyQuoted = null)
|
||||
public function __construct($value, $key = null)
|
||||
{
|
||||
$this->value = $value;
|
||||
$this->key = $key;
|
||||
$this->kindValueQuoted = $kindValueQuoted;
|
||||
$this->kindKeyQuoted = $kindKeyQuoted;
|
||||
}
|
||||
public function __toString() : string
|
||||
{
|
||||
$value = '';
|
||||
if ($this->kindKeyQuoted === String_::KIND_DOUBLE_QUOTED) {
|
||||
$value .= '"' . $this->key . '" = ';
|
||||
} elseif ($this->key !== null) {
|
||||
if ($this->key !== null) {
|
||||
$value .= $this->key . '=';
|
||||
}
|
||||
// @todo depends on the context! possibly the top array is quting this stinrg already
|
||||
if ($this->kindValueQuoted === String_::KIND_DOUBLE_QUOTED) {
|
||||
$value .= '"' . $this->value . '"';
|
||||
} elseif (\is_array($this->value)) {
|
||||
if (\is_array($this->value)) {
|
||||
foreach ($this->value as $singleValue) {
|
||||
$value .= $singleValue;
|
||||
}
|
||||
|
33
packages/BetterPhpDocParser/PhpDoc/StringNode.php
Normal file
33
packages/BetterPhpDocParser/PhpDoc/StringNode.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\BetterPhpDocParser\PhpDoc;
|
||||
|
||||
use PhpParser\Node\Scalar\String_;
|
||||
use PHPStan\PhpDocParser\Ast\NodeAttributes;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Stringable;
|
||||
final class StringNode implements PhpDocTagValueNode
|
||||
{
|
||||
use NodeAttributes;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $value;
|
||||
public function __construct(string $value)
|
||||
{
|
||||
$this->value = $value;
|
||||
$this->value = \str_replace('""', '"', $this->value);
|
||||
if (\strpos($this->value, "'") !== \false && \strpos($this->value, "\n") === \false) {
|
||||
$kind = String_::KIND_DOUBLE_QUOTED;
|
||||
} else {
|
||||
$kind = String_::KIND_SINGLE_QUOTED;
|
||||
}
|
||||
$this->setAttribute(AttributeKey::KIND, $kind);
|
||||
}
|
||||
public function __toString() : string
|
||||
{
|
||||
return '"' . \str_replace('"', '""', $this->value) . '"';
|
||||
}
|
||||
}
|
@ -7,6 +7,7 @@ use RectorPrefix202306\Nette\Utils\Strings;
|
||||
use PhpParser\Node;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\ArrayItemNode;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\StringNode;
|
||||
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo;
|
||||
use Rector\BetterPhpDocParser\PhpDocParser\ClassAnnotationMatcher;
|
||||
use Rector\BetterPhpDocParser\ValueObject\PhpDoc\DoctrineAnnotation\CurlyListNode;
|
||||
@ -54,11 +55,15 @@ final class PhpDocClassRenamer
|
||||
}
|
||||
$callableCallbackArrayItems = $callbackClass->getValues();
|
||||
$classNameArrayItemNode = $callableCallbackArrayItems[0];
|
||||
$classNameStringNode = $classNameArrayItemNode->value;
|
||||
if (!$classNameStringNode instanceof StringNode) {
|
||||
return;
|
||||
}
|
||||
foreach ($oldToNewClasses as $oldClass => $newClass) {
|
||||
if ($classNameArrayItemNode->value !== $oldClass) {
|
||||
if ($classNameStringNode->value !== $oldClass) {
|
||||
continue;
|
||||
}
|
||||
$classNameArrayItemNode->value = $newClass;
|
||||
$classNameStringNode->value = $newClass;
|
||||
// trigger reprint
|
||||
$classNameArrayItemNode->setAttribute(PhpDocAttributeKey::ORIG_NODE, null);
|
||||
break;
|
||||
@ -86,20 +91,25 @@ final class PhpDocClassRenamer
|
||||
}
|
||||
$classNameArrayItemNode = $doctrineAnnotationTagValueNode->getSilentValue();
|
||||
foreach ($oldToNewClasses as $oldClass => $newClass) {
|
||||
if ($classNameArrayItemNode instanceof ArrayItemNode) {
|
||||
if ($classNameArrayItemNode->value === $oldClass) {
|
||||
$classNameArrayItemNode->value = $newClass;
|
||||
if ($classNameArrayItemNode instanceof ArrayItemNode && $classNameArrayItemNode->value instanceof StringNode) {
|
||||
$classNameStringNode = $classNameArrayItemNode->value;
|
||||
if ($classNameStringNode->value === $oldClass) {
|
||||
$classNameStringNode->value = $newClass;
|
||||
continue;
|
||||
}
|
||||
$classNameArrayItemNode->value = Strings::replace($classNameArrayItemNode->value, '#\\b' . \preg_quote($oldClass, '#') . '\\b#', $newClass);
|
||||
$classNameStringNode->value = Strings::replace($classNameStringNode->value, '#\\b' . \preg_quote($oldClass, '#') . '\\b#', $newClass);
|
||||
$classNameArrayItemNode->setAttribute(PhpDocAttributeKey::ORIG_NODE, null);
|
||||
}
|
||||
$currentTypeArrayItemNode = $doctrineAnnotationTagValueNode->getValue('type');
|
||||
if (!$currentTypeArrayItemNode instanceof ArrayItemNode) {
|
||||
continue;
|
||||
}
|
||||
if ($currentTypeArrayItemNode->value === $oldClass) {
|
||||
$currentTypeArrayItemNode->value = $newClass;
|
||||
$currentTypeStringNode = $currentTypeArrayItemNode->value;
|
||||
if (!$currentTypeStringNode instanceof StringNode) {
|
||||
continue;
|
||||
}
|
||||
if ($currentTypeStringNode->value === $oldClass) {
|
||||
$currentTypeStringNode->value = $newClass;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -113,14 +123,18 @@ final class PhpDocClassRenamer
|
||||
if (!$targetEntityArrayItemNode instanceof ArrayItemNode) {
|
||||
return;
|
||||
}
|
||||
$targetEntityClass = $targetEntityArrayItemNode->value;
|
||||
$targetEntityStringNode = $targetEntityArrayItemNode->value;
|
||||
if (!$targetEntityStringNode instanceof StringNode) {
|
||||
return;
|
||||
}
|
||||
$targetEntityClass = $targetEntityStringNode->value;
|
||||
// resolve to FQN
|
||||
$tagFullyQualifiedName = $this->classAnnotationMatcher->resolveTagFullyQualifiedName($targetEntityClass, $node);
|
||||
foreach ($oldToNewClasses as $oldClass => $newClass) {
|
||||
if ($tagFullyQualifiedName !== $oldClass) {
|
||||
continue;
|
||||
}
|
||||
$targetEntityArrayItemNode->value = $newClass;
|
||||
$targetEntityStringNode->value = $newClass;
|
||||
$targetEntityArrayItemNode->setAttribute(PhpDocAttributeKey::ORIG_NODE, null);
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode;
|
||||
use PHPStan\PhpDocParser\Lexer\Lexer;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\ArrayItemNode;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\StringNode;
|
||||
use Rector\BetterPhpDocParser\PhpDocParser\StaticDoctrineAnnotationParser\ArrayParser;
|
||||
use Rector\BetterPhpDocParser\PhpDocParser\StaticDoctrineAnnotationParser\PlainValueParser;
|
||||
use Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator;
|
||||
@ -52,7 +53,7 @@ final class StaticDoctrineAnnotationParser
|
||||
/**
|
||||
* @api tests
|
||||
* @see https://github.com/doctrine/annotations/blob/c66f06b7c83e9a2a7523351a9d5a4b55f885e574/lib/Doctrine/Common/Annotations/DocParser.php#L1215-L1224
|
||||
* @return CurlyListNode|string|array<mixed>|ConstExprNode|DoctrineAnnotationTagValueNode
|
||||
* @return CurlyListNode|string|array<mixed>|ConstExprNode|DoctrineAnnotationTagValueNode|StringNode
|
||||
*/
|
||||
public function resolveAnnotationValue(BetterTokenIterator $tokenIterator)
|
||||
{
|
||||
@ -107,7 +108,7 @@ final class StaticDoctrineAnnotationParser
|
||||
return $this->arrayParser->createArrayFromValues($values);
|
||||
}
|
||||
/**
|
||||
* @return CurlyListNode|string|array<mixed>|ConstExprNode|DoctrineAnnotationTagValueNode
|
||||
* @return CurlyListNode|string|array<mixed>|ConstExprNode|DoctrineAnnotationTagValueNode|StringNode
|
||||
*/
|
||||
private function parseValue(BetterTokenIterator $tokenIterator)
|
||||
{
|
||||
|
@ -7,6 +7,7 @@ use PhpParser\Node\Scalar\String_;
|
||||
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprIntegerNode;
|
||||
use PHPStan\PhpDocParser\Lexer\Lexer;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\ArrayItemNode;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\StringNode;
|
||||
use Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator;
|
||||
/**
|
||||
* @see \Rector\Tests\BetterPhpDocParser\PhpDocParser\StaticDoctrineAnnotationParser\ArrayParserTest
|
||||
@ -143,25 +144,29 @@ final class ArrayParser
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* @param mixed $key
|
||||
* @param mixed $value
|
||||
* @param mixed $rawKey
|
||||
* @param mixed $rawValue
|
||||
*/
|
||||
private function createArrayItemFromKeyAndValue($key, $value) : ArrayItemNode
|
||||
private function createArrayItemFromKeyAndValue($rawKey, $rawValue) : ArrayItemNode
|
||||
{
|
||||
$valueQuoteKind = $this->resolveQuoteKind($value);
|
||||
if (\is_string($value) && $valueQuoteKind === String_::KIND_DOUBLE_QUOTED) {
|
||||
$valueQuoteKind = $this->resolveQuoteKind($rawValue);
|
||||
if (\is_string($rawValue) && $valueQuoteKind === String_::KIND_DOUBLE_QUOTED) {
|
||||
// give raw value
|
||||
$value = \trim($value, '"');
|
||||
$value = new StringNode(\substr($rawValue, 1, \strlen($rawValue) - 2));
|
||||
} else {
|
||||
$value = $rawValue;
|
||||
}
|
||||
$keyQuoteKind = $this->resolveQuoteKind($key);
|
||||
if (\is_string($key) && $keyQuoteKind === String_::KIND_DOUBLE_QUOTED) {
|
||||
$keyQuoteKind = $this->resolveQuoteKind($rawKey);
|
||||
if (\is_string($rawKey) && $keyQuoteKind === String_::KIND_DOUBLE_QUOTED) {
|
||||
// give raw value
|
||||
$key = \trim($key, '"');
|
||||
$key = new StringNode(\substr($rawKey, 1, \strlen($rawKey) - 2));
|
||||
} else {
|
||||
$key = $rawKey;
|
||||
}
|
||||
if ($key !== null) {
|
||||
return new ArrayItemNode($value, $key, $valueQuoteKind, $keyQuoteKind);
|
||||
return new ArrayItemNode($value, $key);
|
||||
}
|
||||
return new ArrayItemNode($value, null, $valueQuoteKind, $keyQuoteKind);
|
||||
return new ArrayItemNode($value);
|
||||
}
|
||||
/**
|
||||
* @param mixed $value
|
||||
|
@ -11,6 +11,7 @@ use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprTrueNode;
|
||||
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
|
||||
use PHPStan\PhpDocParser\Lexer\Lexer;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\StringNode;
|
||||
use Rector\BetterPhpDocParser\PhpDocParser\ClassAnnotationMatcher;
|
||||
use Rector\BetterPhpDocParser\PhpDocParser\StaticDoctrineAnnotationParser;
|
||||
use Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator;
|
||||
@ -52,7 +53,7 @@ final class PlainValueParser
|
||||
$this->arrayParser = $arrayParser;
|
||||
}
|
||||
/**
|
||||
* @return string|mixed[]|ConstExprNode|DoctrineAnnotationTagValueNode
|
||||
* @return string|mixed[]|ConstExprNode|DoctrineAnnotationTagValueNode|StringNode
|
||||
*/
|
||||
public function parseValue(BetterTokenIterator $tokenIterator)
|
||||
{
|
||||
@ -89,7 +90,7 @@ final class PlainValueParser
|
||||
}
|
||||
$end = $tokenIterator->currentPosition();
|
||||
if ($start + 1 < $end) {
|
||||
return $tokenIterator->printFromTo($start, $end);
|
||||
return new StringNode($tokenIterator->printFromTo($start, $end));
|
||||
}
|
||||
return $currentTokenValue;
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ namespace Rector\BetterPhpDocParser\ValueObject\PhpDoc\DoctrineAnnotation;
|
||||
use PHPStan\PhpDocParser\Ast\NodeAttributes;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\ArrayItemNode;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\StringNode;
|
||||
use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
||||
abstract class AbstractValuesAwareNode implements PhpDocTagValueNode
|
||||
{
|
||||
@ -41,7 +42,7 @@ abstract class AbstractValuesAwareNode implements PhpDocTagValueNode
|
||||
public function removeValue(string $desiredKey) : void
|
||||
{
|
||||
foreach ($this->values as $key => $value) {
|
||||
if ($value->key !== $desiredKey) {
|
||||
if (!$this->isValueKeyEquals($value, $desiredKey)) {
|
||||
continue;
|
||||
}
|
||||
unset($this->values[$key]);
|
||||
@ -77,7 +78,7 @@ abstract class AbstractValuesAwareNode implements PhpDocTagValueNode
|
||||
public function getValue(string $desiredKey) : ?ArrayItemNode
|
||||
{
|
||||
foreach ($this->values as $value) {
|
||||
if ($value->key === $desiredKey) {
|
||||
if ($this->isValueKeyEquals($value, $desiredKey)) {
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
@ -116,6 +117,13 @@ abstract class AbstractValuesAwareNode implements PhpDocTagValueNode
|
||||
}
|
||||
return $itemContents;
|
||||
}
|
||||
private function isValueKeyEquals(ArrayItemNode $value, string $desiredKey) : bool
|
||||
{
|
||||
if ($value->key instanceof StringNode) {
|
||||
return $value->key->value === $desiredKey;
|
||||
}
|
||||
return $value->key === $desiredKey;
|
||||
}
|
||||
/**
|
||||
* @param mixed $value
|
||||
*/
|
||||
|
@ -5,8 +5,11 @@ namespace Rector\PhpAttribute;
|
||||
|
||||
use PhpParser\BuilderHelpers;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Scalar\String_;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\ArrayItemNode;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\StringNode;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\PhpAttribute\Contract\AnnotationToAttributeMapperInterface;
|
||||
use Rector\PhpAttribute\Enum\DocTagNodeState;
|
||||
/**
|
||||
@ -47,6 +50,9 @@ final class AnnotationToAttributeMapper
|
||||
if ($value instanceof ArrayItemNode) {
|
||||
return BuilderHelpers::normalizeValue((string) $value);
|
||||
}
|
||||
if ($value instanceof StringNode) {
|
||||
return new String_($value->value, [AttributeKey::KIND => $value->getAttribute(AttributeKey::KIND)]);
|
||||
}
|
||||
// fallback
|
||||
return BuilderHelpers::normalizeValue($value);
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ use PhpParser\Node\Scalar\String_;
|
||||
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\ArrayItemNode;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\StringNode;
|
||||
use Rector\Core\Validation\RectorAssert;
|
||||
use Rector\PhpAttribute\AnnotationToAttributeMapper;
|
||||
use Rector\PhpAttribute\Contract\AnnotationToAttributeMapperInterface;
|
||||
@ -49,19 +50,8 @@ final class ArrayItemNodeAnnotationToAttributeMapper implements AnnotationToAttr
|
||||
return new ArrayItem(new String_($valueExpr), null);
|
||||
}
|
||||
if ($arrayItemNode->key !== null) {
|
||||
switch ($arrayItemNode->kindKeyQuoted) {
|
||||
case String_::KIND_SINGLE_QUOTED:
|
||||
$keyValue = "'" . $arrayItemNode->key . "'";
|
||||
break;
|
||||
case String_::KIND_DOUBLE_QUOTED:
|
||||
$keyValue = '"' . $arrayItemNode->key . '"';
|
||||
break;
|
||||
default:
|
||||
$keyValue = $arrayItemNode->key;
|
||||
break;
|
||||
}
|
||||
/** @var Expr $keyExpr */
|
||||
$keyExpr = $this->annotationToAttributeMapper->map($keyValue);
|
||||
$keyExpr = $this->annotationToAttributeMapper->map($arrayItemNode->key);
|
||||
} else {
|
||||
if ($this->hasNoParenthesesAnnotation($arrayItemNode)) {
|
||||
try {
|
||||
@ -79,7 +69,7 @@ final class ArrayItemNodeAnnotationToAttributeMapper implements AnnotationToAttr
|
||||
}
|
||||
private function hasNoParenthesesAnnotation(ArrayItemNode $arrayItemNode) : bool
|
||||
{
|
||||
if (\is_int($arrayItemNode->kindValueQuoted)) {
|
||||
if ($arrayItemNode->value instanceof StringNode) {
|
||||
return \false;
|
||||
}
|
||||
if (!\is_string($arrayItemNode->value)) {
|
||||
|
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\PhpAttribute\AnnotationToAttributeMapper;
|
||||
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Scalar\String_;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\StringNode;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\PhpAttribute\Contract\AnnotationToAttributeMapperInterface;
|
||||
/**
|
||||
* @implements AnnotationToAttributeMapperInterface<StringNode>
|
||||
*/
|
||||
final class StringNodeAnnotationToAttributeMapper implements AnnotationToAttributeMapperInterface
|
||||
{
|
||||
/**
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function isCandidate($value) : bool
|
||||
{
|
||||
return $value instanceof StringNode;
|
||||
}
|
||||
/**
|
||||
* @param StringNode $value
|
||||
*/
|
||||
public function map($value) : Expr
|
||||
{
|
||||
return new String_($value->value, [AttributeKey::KIND => $value->getAttribute(AttributeKey::KIND)]);
|
||||
}
|
||||
}
|
@ -5,6 +5,7 @@ namespace Rector\Php80\NodeAnalyzer;
|
||||
|
||||
use PhpParser\Node\Expr\ClassConstFetch;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\ArrayItemNode;
|
||||
use Rector\BetterPhpDocParser\PhpDoc\StringNode;
|
||||
use Rector\Core\PhpParser\Node\NodeFactory;
|
||||
final class AnnotationTargetResolver
|
||||
{
|
||||
@ -39,7 +40,10 @@ final class AnnotationTargetResolver
|
||||
$classConstFetches = [];
|
||||
foreach ($targetValues as $targetValue) {
|
||||
foreach (self::TARGET_TO_CONSTANT_MAP as $target => $constant) {
|
||||
if ($target !== $targetValue->value) {
|
||||
if (!$targetValue->value instanceof StringNode) {
|
||||
continue;
|
||||
}
|
||||
if ($target !== $targetValue->value->value) {
|
||||
continue;
|
||||
}
|
||||
$classConstFetches[] = $this->nodeFactory->createClassConstFetch('Attribute', $constant);
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '7cde4132f7705a0f941867d66c909abd114e758d';
|
||||
public const PACKAGE_VERSION = '92ff716761e19c7f30bd68065af7eeefac0480de';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-06-02 05:50:24';
|
||||
public const RELEASE_DATE = '2023-06-02 10:38:22';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInitd75f49d13210b47c08efbef08539e2b9::getLoader();
|
||||
return ComposerAutoloaderInitcf48d20d0276ea83626472d23bf244a0::getLoader();
|
||||
|
2
vendor/composer/autoload_classmap.php
vendored
2
vendor/composer/autoload_classmap.php
vendored
@ -1171,6 +1171,7 @@ return array(
|
||||
'Rector\\BetterPhpDocParser\\PhpDoc\\ArrayItemNode' => $baseDir . '/packages/BetterPhpDocParser/PhpDoc/ArrayItemNode.php',
|
||||
'Rector\\BetterPhpDocParser\\PhpDoc\\DoctrineAnnotationTagValueNode' => $baseDir . '/packages/BetterPhpDocParser/PhpDoc/DoctrineAnnotationTagValueNode.php',
|
||||
'Rector\\BetterPhpDocParser\\PhpDoc\\SpacelessPhpDocTagNode' => $baseDir . '/packages/BetterPhpDocParser/PhpDoc/SpacelessPhpDocTagNode.php',
|
||||
'Rector\\BetterPhpDocParser\\PhpDoc\\StringNode' => $baseDir . '/packages/BetterPhpDocParser/PhpDoc/StringNode.php',
|
||||
'Rector\\BetterPhpDocParser\\Printer\\DocBlockInliner' => $baseDir . '/packages/BetterPhpDocParser/Printer/DocBlockInliner.php',
|
||||
'Rector\\BetterPhpDocParser\\Printer\\EmptyPhpDocDetector' => $baseDir . '/packages/BetterPhpDocParser/Printer/EmptyPhpDocDetector.php',
|
||||
'Rector\\BetterPhpDocParser\\Printer\\PhpDocInfoPrinter' => $baseDir . '/packages/BetterPhpDocParser/Printer/PhpDocInfoPrinter.php',
|
||||
@ -2306,6 +2307,7 @@ return array(
|
||||
'Rector\\PhpAttribute\\AnnotationToAttributeMapper\\CurlyListNodeAnnotationToAttributeMapper' => $baseDir . '/packages/PhpAttribute/AnnotationToAttributeMapper/CurlyListNodeAnnotationToAttributeMapper.php',
|
||||
'Rector\\PhpAttribute\\AnnotationToAttributeMapper\\DoctrineAnnotationAnnotationToAttributeMapper' => $baseDir . '/packages/PhpAttribute/AnnotationToAttributeMapper/DoctrineAnnotationAnnotationToAttributeMapper.php',
|
||||
'Rector\\PhpAttribute\\AnnotationToAttributeMapper\\StringAnnotationToAttributeMapper' => $baseDir . '/packages/PhpAttribute/AnnotationToAttributeMapper/StringAnnotationToAttributeMapper.php',
|
||||
'Rector\\PhpAttribute\\AnnotationToAttributeMapper\\StringNodeAnnotationToAttributeMapper' => $baseDir . '/packages/PhpAttribute/AnnotationToAttributeMapper/StringNodeAnnotationToAttributeMapper.php',
|
||||
'Rector\\PhpAttribute\\AttributeArrayNameInliner' => $baseDir . '/packages/PhpAttribute/AttributeArrayNameInliner.php',
|
||||
'Rector\\PhpAttribute\\Contract\\AnnotationToAttributeMapperInterface' => $baseDir . '/packages/PhpAttribute/Contract/AnnotationToAttributeMapperInterface.php',
|
||||
'Rector\\PhpAttribute\\Enum\\DocTagNodeState' => $baseDir . '/packages/PhpAttribute/Enum/DocTagNodeState.php',
|
||||
|
10
vendor/composer/autoload_real.php
vendored
10
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInitd75f49d13210b47c08efbef08539e2b9
|
||||
class ComposerAutoloaderInitcf48d20d0276ea83626472d23bf244a0
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInitd75f49d13210b47c08efbef08539e2b9
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitd75f49d13210b47c08efbef08539e2b9', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitcf48d20d0276ea83626472d23bf244a0', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitd75f49d13210b47c08efbef08539e2b9', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitcf48d20d0276ea83626472d23bf244a0', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitd75f49d13210b47c08efbef08539e2b9::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitcf48d20d0276ea83626472d23bf244a0::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitd75f49d13210b47c08efbef08539e2b9::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitcf48d20d0276ea83626472d23bf244a0::$files;
|
||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
10
vendor/composer/autoload_static.php
vendored
10
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInitd75f49d13210b47c08efbef08539e2b9
|
||||
class ComposerStaticInitcf48d20d0276ea83626472d23bf244a0
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -1413,6 +1413,7 @@ class ComposerStaticInitd75f49d13210b47c08efbef08539e2b9
|
||||
'Rector\\BetterPhpDocParser\\PhpDoc\\ArrayItemNode' => __DIR__ . '/../..' . '/packages/BetterPhpDocParser/PhpDoc/ArrayItemNode.php',
|
||||
'Rector\\BetterPhpDocParser\\PhpDoc\\DoctrineAnnotationTagValueNode' => __DIR__ . '/../..' . '/packages/BetterPhpDocParser/PhpDoc/DoctrineAnnotationTagValueNode.php',
|
||||
'Rector\\BetterPhpDocParser\\PhpDoc\\SpacelessPhpDocTagNode' => __DIR__ . '/../..' . '/packages/BetterPhpDocParser/PhpDoc/SpacelessPhpDocTagNode.php',
|
||||
'Rector\\BetterPhpDocParser\\PhpDoc\\StringNode' => __DIR__ . '/../..' . '/packages/BetterPhpDocParser/PhpDoc/StringNode.php',
|
||||
'Rector\\BetterPhpDocParser\\Printer\\DocBlockInliner' => __DIR__ . '/../..' . '/packages/BetterPhpDocParser/Printer/DocBlockInliner.php',
|
||||
'Rector\\BetterPhpDocParser\\Printer\\EmptyPhpDocDetector' => __DIR__ . '/../..' . '/packages/BetterPhpDocParser/Printer/EmptyPhpDocDetector.php',
|
||||
'Rector\\BetterPhpDocParser\\Printer\\PhpDocInfoPrinter' => __DIR__ . '/../..' . '/packages/BetterPhpDocParser/Printer/PhpDocInfoPrinter.php',
|
||||
@ -2548,6 +2549,7 @@ class ComposerStaticInitd75f49d13210b47c08efbef08539e2b9
|
||||
'Rector\\PhpAttribute\\AnnotationToAttributeMapper\\CurlyListNodeAnnotationToAttributeMapper' => __DIR__ . '/../..' . '/packages/PhpAttribute/AnnotationToAttributeMapper/CurlyListNodeAnnotationToAttributeMapper.php',
|
||||
'Rector\\PhpAttribute\\AnnotationToAttributeMapper\\DoctrineAnnotationAnnotationToAttributeMapper' => __DIR__ . '/../..' . '/packages/PhpAttribute/AnnotationToAttributeMapper/DoctrineAnnotationAnnotationToAttributeMapper.php',
|
||||
'Rector\\PhpAttribute\\AnnotationToAttributeMapper\\StringAnnotationToAttributeMapper' => __DIR__ . '/../..' . '/packages/PhpAttribute/AnnotationToAttributeMapper/StringAnnotationToAttributeMapper.php',
|
||||
'Rector\\PhpAttribute\\AnnotationToAttributeMapper\\StringNodeAnnotationToAttributeMapper' => __DIR__ . '/../..' . '/packages/PhpAttribute/AnnotationToAttributeMapper/StringNodeAnnotationToAttributeMapper.php',
|
||||
'Rector\\PhpAttribute\\AttributeArrayNameInliner' => __DIR__ . '/../..' . '/packages/PhpAttribute/AttributeArrayNameInliner.php',
|
||||
'Rector\\PhpAttribute\\Contract\\AnnotationToAttributeMapperInterface' => __DIR__ . '/../..' . '/packages/PhpAttribute/Contract/AnnotationToAttributeMapperInterface.php',
|
||||
'Rector\\PhpAttribute\\Enum\\DocTagNodeState' => __DIR__ . '/../..' . '/packages/PhpAttribute/Enum/DocTagNodeState.php',
|
||||
@ -3066,9 +3068,9 @@ class ComposerStaticInitd75f49d13210b47c08efbef08539e2b9
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitd75f49d13210b47c08efbef08539e2b9::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitd75f49d13210b47c08efbef08539e2b9::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitd75f49d13210b47c08efbef08539e2b9::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitcf48d20d0276ea83626472d23bf244a0::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitcf48d20d0276ea83626472d23bf244a0::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitcf48d20d0276ea83626472d23bf244a0::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user