mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 13:28:18 +01:00
Updated Rector to commit 4457cfad19971c45ff953b238f456590bb6fd67f
4457cfad19
Remove ConstantListClassToEnumRector as custom-made, not practical for enum upgrades (#4115)
This commit is contained in:
parent
f486676c12
commit
850512e46d
@ -1,82 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Php80\NodeAnalyzer;
|
||||
|
||||
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstFetchNode;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\ReturnTagValueNode;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\VarTagValueNode;
|
||||
use PHPStan\PhpDocParser\Ast\Type\ConstTypeNode;
|
||||
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
|
||||
use PHPStan\Reflection\ParameterReflection;
|
||||
use PHPStan\Reflection\ReflectionProvider;
|
||||
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo;
|
||||
use Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey;
|
||||
use Rector\Php80\ValueObject\ClassNameAndTagValueNode;
|
||||
/**
|
||||
* Detects enum-like params, e.g.
|
||||
* Direction::*
|
||||
*/
|
||||
final class EnumParamAnalyzer
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
* @var \PHPStan\Reflection\ReflectionProvider
|
||||
*/
|
||||
private $reflectionProvider;
|
||||
public function __construct(ReflectionProvider $reflectionProvider)
|
||||
{
|
||||
$this->reflectionProvider = $reflectionProvider;
|
||||
}
|
||||
public function matchParameterClassName(ParameterReflection $parameterReflection, PhpDocInfo $phpDocInfo) : ?ClassNameAndTagValueNode
|
||||
{
|
||||
$paramTagValueNode = $phpDocInfo->getParamTagValueByName($parameterReflection->getName());
|
||||
if (!$paramTagValueNode instanceof ParamTagValueNode) {
|
||||
return null;
|
||||
}
|
||||
$className = $this->resolveClassFromConstType($paramTagValueNode->type);
|
||||
if ($className === null) {
|
||||
return null;
|
||||
}
|
||||
if (!$this->reflectionProvider->hasClass($className)) {
|
||||
return null;
|
||||
}
|
||||
return new ClassNameAndTagValueNode($className, $paramTagValueNode);
|
||||
}
|
||||
public function matchReturnClassName(PhpDocInfo $phpDocInfo) : ?ClassNameAndTagValueNode
|
||||
{
|
||||
$returnTagValueNode = $phpDocInfo->getReturnTagValue();
|
||||
if (!$returnTagValueNode instanceof ReturnTagValueNode) {
|
||||
return null;
|
||||
}
|
||||
$className = $this->resolveClassFromConstType($returnTagValueNode->type);
|
||||
if (!\is_string($className)) {
|
||||
return null;
|
||||
}
|
||||
return new ClassNameAndTagValueNode($className, $returnTagValueNode);
|
||||
}
|
||||
public function matchPropertyClassName(PhpDocInfo $phpDocInfo) : ?ClassNameAndTagValueNode
|
||||
{
|
||||
$varTagValueNode = $phpDocInfo->getVarTagValueNode();
|
||||
if (!$varTagValueNode instanceof VarTagValueNode) {
|
||||
return null;
|
||||
}
|
||||
$className = $this->resolveClassFromConstType($varTagValueNode->type);
|
||||
if (!\is_string($className)) {
|
||||
return null;
|
||||
}
|
||||
return new ClassNameAndTagValueNode($className, $varTagValueNode);
|
||||
}
|
||||
private function resolveClassFromConstType(TypeNode $typeNode) : ?string
|
||||
{
|
||||
if (!$typeNode instanceof ConstTypeNode) {
|
||||
return null;
|
||||
}
|
||||
if (!$typeNode->constExpr instanceof ConstFetchNode) {
|
||||
return null;
|
||||
}
|
||||
$constExpr = $typeNode->constExpr;
|
||||
return $constExpr->getAttribute(PhpDocAttributeKey::RESOLVED_CLASS);
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Php80\ValueObject;
|
||||
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\ReturnTagValueNode;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\VarTagValueNode;
|
||||
final class ClassNameAndTagValueNode
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
* @var string
|
||||
*/
|
||||
private $enumClass;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode|\PHPStan\PhpDocParser\Ast\PhpDoc\ReturnTagValueNode|\PHPStan\PhpDocParser\Ast\PhpDoc\VarTagValueNode
|
||||
*/
|
||||
private $tagValueNode;
|
||||
/**
|
||||
* @param \PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode|\PHPStan\PhpDocParser\Ast\PhpDoc\ReturnTagValueNode|\PHPStan\PhpDocParser\Ast\PhpDoc\VarTagValueNode $tagValueNode
|
||||
*/
|
||||
public function __construct(string $enumClass, $tagValueNode)
|
||||
{
|
||||
$this->enumClass = $enumClass;
|
||||
$this->tagValueNode = $tagValueNode;
|
||||
}
|
||||
public function getEnumClass() : string
|
||||
{
|
||||
return $this->enumClass;
|
||||
}
|
||||
/**
|
||||
* @return \PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode|\PHPStan\PhpDocParser\Ast\PhpDoc\ReturnTagValueNode|\PHPStan\PhpDocParser\Ast\PhpDoc\VarTagValueNode
|
||||
*/
|
||||
public function getTagValueNode()
|
||||
{
|
||||
return $this->tagValueNode;
|
||||
}
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Php81\NodeAnalyzer;
|
||||
|
||||
use PhpParser\Node\Scalar;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\Node\Stmt\ClassConst;
|
||||
use PHPStan\Type\Type;
|
||||
use Rector\NodeTypeResolver\NodeTypeResolver;
|
||||
final class EnumConstListClassDetector
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\NodeTypeResolver\NodeTypeResolver
|
||||
*/
|
||||
private $nodeTypeResolver;
|
||||
public function __construct(NodeTypeResolver $nodeTypeResolver)
|
||||
{
|
||||
$this->nodeTypeResolver = $nodeTypeResolver;
|
||||
}
|
||||
public function detect(Class_ $class) : bool
|
||||
{
|
||||
$classConstants = $class->getConstants();
|
||||
// must have at least 2 constants, otherwise probably not enum
|
||||
if (\count($classConstants) < 2) {
|
||||
return \false;
|
||||
}
|
||||
// only constants are allowed, nothing else
|
||||
if (\count($class->stmts) !== \count($classConstants)) {
|
||||
return \false;
|
||||
}
|
||||
// all constant must be public
|
||||
if (!$this->hasExclusivelyPublicClassConsts($classConstants)) {
|
||||
return \false;
|
||||
}
|
||||
// all constants must have exactly 1 value
|
||||
foreach ($classConstants as $classConstant) {
|
||||
if (\count($classConstant->consts) !== 1) {
|
||||
return \false;
|
||||
}
|
||||
}
|
||||
// only scalar values are allowed
|
||||
foreach ($classConstants as $classConstant) {
|
||||
$onlyConstConst = $classConstant->consts[0];
|
||||
if (!$onlyConstConst->value instanceof Scalar) {
|
||||
return \false;
|
||||
}
|
||||
}
|
||||
$uniqueTypeClasses = $this->resolveClassConstTypes($classConstants);
|
||||
// must be exactly 1 type
|
||||
return \count($uniqueTypeClasses) === 1;
|
||||
}
|
||||
/**
|
||||
* @param ClassConst[] $classConsts
|
||||
* @return array<class-string<Type>>
|
||||
*/
|
||||
private function resolveClassConstTypes(array $classConsts) : array
|
||||
{
|
||||
$typeClasses = [];
|
||||
// all constants must have same type
|
||||
foreach ($classConsts as $classConst) {
|
||||
$const = $classConst->consts[0];
|
||||
$type = $this->nodeTypeResolver->getType($const->value);
|
||||
$typeClasses[] = \get_class($type);
|
||||
}
|
||||
return \array_unique($typeClasses);
|
||||
}
|
||||
/**
|
||||
* @param ClassConst[] $classConsts
|
||||
*/
|
||||
private function hasExclusivelyPublicClassConsts(array $classConsts) : bool
|
||||
{
|
||||
foreach ($classConsts as $classConst) {
|
||||
if (!$classConst->isPublic()) {
|
||||
return \false;
|
||||
}
|
||||
}
|
||||
return \true;
|
||||
}
|
||||
}
|
@ -1,181 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Php81\Rector\Class_;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Name\FullyQualified;
|
||||
use PhpParser\Node\Param;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PhpParser\Node\Stmt\Property;
|
||||
use PHPStan\Reflection\MethodReflection;
|
||||
use PHPStan\Reflection\ParametersAcceptorSelector;
|
||||
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo;
|
||||
use Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTagRemover;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\Core\Reflection\ReflectionResolver;
|
||||
use Rector\Php80\NodeAnalyzer\EnumParamAnalyzer;
|
||||
use Rector\Php80\ValueObject\ClassNameAndTagValueNode;
|
||||
use Rector\Php81\NodeAnalyzer\EnumConstListClassDetector;
|
||||
use Rector\Php81\NodeFactory\EnumFactory;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
/**
|
||||
* @see \Rector\Tests\Php81\Rector\Class_\ConstantListClassToEnumRector\ConstantListClassToEnumRectorTest
|
||||
*/
|
||||
final class ConstantListClassToEnumRector extends AbstractRector
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Php81\NodeAnalyzer\EnumConstListClassDetector
|
||||
*/
|
||||
private $enumConstListClassDetector;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Php81\NodeFactory\EnumFactory
|
||||
*/
|
||||
private $enumFactory;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Php80\NodeAnalyzer\EnumParamAnalyzer
|
||||
*/
|
||||
private $enumParamAnalyzer;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\Core\Reflection\ReflectionResolver
|
||||
*/
|
||||
private $reflectionResolver;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\BetterPhpDocParser\PhpDocManipulator\PhpDocTagRemover
|
||||
*/
|
||||
private $phpDocTagRemover;
|
||||
public function __construct(EnumConstListClassDetector $enumConstListClassDetector, EnumFactory $enumFactory, EnumParamAnalyzer $enumParamAnalyzer, ReflectionResolver $reflectionResolver, PhpDocTagRemover $phpDocTagRemover)
|
||||
{
|
||||
$this->enumConstListClassDetector = $enumConstListClassDetector;
|
||||
$this->enumFactory = $enumFactory;
|
||||
$this->enumParamAnalyzer = $enumParamAnalyzer;
|
||||
$this->reflectionResolver = $reflectionResolver;
|
||||
$this->phpDocTagRemover = $phpDocTagRemover;
|
||||
}
|
||||
public function getRuleDefinition() : RuleDefinition
|
||||
{
|
||||
return new RuleDefinition('Upgrade constant list classes to full blown enum', [new CodeSample(<<<'CODE_SAMPLE'
|
||||
class Direction
|
||||
{
|
||||
public const LEFT = 'left';
|
||||
|
||||
public const RIGHT = 'right';
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, <<<'CODE_SAMPLE'
|
||||
enum Direction
|
||||
{
|
||||
case LEFT;
|
||||
|
||||
case RIGHT;
|
||||
}
|
||||
CODE_SAMPLE
|
||||
)]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
*/
|
||||
public function getNodeTypes() : array
|
||||
{
|
||||
return [Class_::class, ClassMethod::class, Property::class];
|
||||
}
|
||||
/**
|
||||
* @param Class_|ClassMethod|Property $node
|
||||
*/
|
||||
public function refactor(Node $node) : ?Node
|
||||
{
|
||||
if ($node instanceof Class_) {
|
||||
if (!$this->enumConstListClassDetector->detect($node)) {
|
||||
return null;
|
||||
}
|
||||
return $this->enumFactory->createFromClass($node);
|
||||
}
|
||||
if ($node instanceof ClassMethod) {
|
||||
return $this->refactorClassMethod($node);
|
||||
}
|
||||
return $this->refactorProperty($node);
|
||||
}
|
||||
private function refactorClassMethod(ClassMethod $classMethod) : ?ClassMethod
|
||||
{
|
||||
// enum param types doc requires a docblock
|
||||
$phpDocInfo = $this->phpDocInfoFactory->createFromNode($classMethod);
|
||||
if (!$phpDocInfo instanceof PhpDocInfo) {
|
||||
return null;
|
||||
}
|
||||
$methodReflection = $this->reflectionResolver->resolveMethodReflectionFromClassMethod($classMethod);
|
||||
if (!$methodReflection instanceof MethodReflection) {
|
||||
return null;
|
||||
}
|
||||
// refactor params
|
||||
$haveParamsChanged = $this->refactorParams($methodReflection, $phpDocInfo, $classMethod);
|
||||
$hasReturnChanged = $this->refactorReturn($phpDocInfo, $classMethod);
|
||||
if ($haveParamsChanged) {
|
||||
return $classMethod;
|
||||
}
|
||||
if ($hasReturnChanged) {
|
||||
return $classMethod;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
private function getParamByName(ClassMethod $classMethod, string $desiredParamName) : ?Param
|
||||
{
|
||||
foreach ($classMethod->params as $param) {
|
||||
if (!$this->nodeNameResolver->isName($param, $desiredParamName)) {
|
||||
continue;
|
||||
}
|
||||
return $param;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
private function refactorParams(MethodReflection $methodReflection, PhpDocInfo $phpDocInfo, ClassMethod $classMethod) : bool
|
||||
{
|
||||
$hasNodeChanged = \false;
|
||||
$parametersAcceptor = ParametersAcceptorSelector::selectSingle($methodReflection->getVariants());
|
||||
foreach ($parametersAcceptor->getParameters() as $parameterReflection) {
|
||||
$classNameAndTagValueNode = $this->enumParamAnalyzer->matchParameterClassName($parameterReflection, $phpDocInfo);
|
||||
if (!$classNameAndTagValueNode instanceof ClassNameAndTagValueNode) {
|
||||
continue;
|
||||
}
|
||||
$param = $this->getParamByName($classMethod, $parameterReflection->getName());
|
||||
if (!$param instanceof Param) {
|
||||
continue;
|
||||
}
|
||||
// change and remove
|
||||
$param->type = new FullyQualified($classNameAndTagValueNode->getEnumClass());
|
||||
$hasNodeChanged = \true;
|
||||
$this->phpDocTagRemover->removeTagValueFromNode($phpDocInfo, $classNameAndTagValueNode->getTagValueNode());
|
||||
}
|
||||
return $hasNodeChanged;
|
||||
}
|
||||
private function refactorReturn(PhpDocInfo $phpDocInfo, ClassMethod $classMethod) : bool
|
||||
{
|
||||
$classNameAndTagValueNode = $this->enumParamAnalyzer->matchReturnClassName($phpDocInfo);
|
||||
if (!$classNameAndTagValueNode instanceof ClassNameAndTagValueNode) {
|
||||
return \false;
|
||||
}
|
||||
$classMethod->returnType = new FullyQualified($classNameAndTagValueNode->getEnumClass());
|
||||
$this->phpDocTagRemover->removeTagValueFromNode($phpDocInfo, $classNameAndTagValueNode->getTagValueNode());
|
||||
return \true;
|
||||
}
|
||||
private function refactorProperty(Property $property) : ?Property
|
||||
{
|
||||
$phpDocInfo = $this->phpDocInfoFactory->createFromNode($property);
|
||||
if (!$phpDocInfo instanceof PhpDocInfo) {
|
||||
return null;
|
||||
}
|
||||
$classNameAndTagValueNode = $this->enumParamAnalyzer->matchPropertyClassName($phpDocInfo);
|
||||
if (!$classNameAndTagValueNode instanceof ClassNameAndTagValueNode) {
|
||||
return null;
|
||||
}
|
||||
$property->type = new FullyQualified($classNameAndTagValueNode->getEnumClass());
|
||||
$this->phpDocTagRemover->removeTagValueFromNode($phpDocInfo, $classNameAndTagValueNode->getTagValueNode());
|
||||
return $property;
|
||||
}
|
||||
}
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '16b60d0f84d824f2eaafadd52650bd4ea84798e5';
|
||||
public const PACKAGE_VERSION = '4457cfad19971c45ff953b238f456590bb6fd67f';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-06-08 15:51:40';
|
||||
public const RELEASE_DATE = '2023-06-08 15:34:21';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
@ -15,7 +15,7 @@ final class RectorKernel
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private const CACHE_KEY = 'v69';
|
||||
private const CACHE_KEY = 'v70';
|
||||
/**
|
||||
* @var \Symfony\Component\DependencyInjection\ContainerInterface|null
|
||||
*/
|
||||
|
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 ComposerAutoloaderInitf7a3ca1a50c7c647320f4111873f33ff::getLoader();
|
||||
return ComposerAutoloaderInit06a25b354321cf0b16cf6435b43f4254::getLoader();
|
||||
|
4
vendor/composer/autoload_classmap.php
vendored
4
vendor/composer/autoload_classmap.php
vendored
@ -2346,7 +2346,6 @@ return array(
|
||||
'Rector\\Php80\\MatchAndRefactor\\StrStartsWithMatchAndRefactor\\StrposMatchAndRefactor' => $baseDir . '/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/StrposMatchAndRefactor.php',
|
||||
'Rector\\Php80\\MatchAndRefactor\\StrStartsWithMatchAndRefactor\\SubstrMatchAndRefactor' => $baseDir . '/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/SubstrMatchAndRefactor.php',
|
||||
'Rector\\Php80\\NodeAnalyzer\\AnnotationTargetResolver' => $baseDir . '/rules/Php80/NodeAnalyzer/AnnotationTargetResolver.php',
|
||||
'Rector\\Php80\\NodeAnalyzer\\EnumParamAnalyzer' => $baseDir . '/rules/Php80/NodeAnalyzer/EnumParamAnalyzer.php',
|
||||
'Rector\\Php80\\NodeAnalyzer\\MatchSwitchAnalyzer' => $baseDir . '/rules/Php80/NodeAnalyzer/MatchSwitchAnalyzer.php',
|
||||
'Rector\\Php80\\NodeAnalyzer\\PhpAttributeAnalyzer' => $baseDir . '/rules/Php80/NodeAnalyzer/PhpAttributeAnalyzer.php',
|
||||
'Rector\\Php80\\NodeAnalyzer\\PromotedPropertyCandidateResolver' => $baseDir . '/rules/Php80/NodeAnalyzer/PromotedPropertyCandidateResolver.php',
|
||||
@ -2384,7 +2383,6 @@ return array(
|
||||
'Rector\\Php80\\ValueObjectFactory\\StrStartsWithFactory' => $baseDir . '/rules/Php80/ValueObjectFactory/StrStartsWithFactory.php',
|
||||
'Rector\\Php80\\ValueObject\\AnnotationPropertyToAttributeClass' => $baseDir . '/rules/Php80/ValueObject/AnnotationPropertyToAttributeClass.php',
|
||||
'Rector\\Php80\\ValueObject\\AnnotationToAttribute' => $baseDir . '/rules/Php80/ValueObject/AnnotationToAttribute.php',
|
||||
'Rector\\Php80\\ValueObject\\ClassNameAndTagValueNode' => $baseDir . '/rules/Php80/ValueObject/ClassNameAndTagValueNode.php',
|
||||
'Rector\\Php80\\ValueObject\\CondAndExpr' => $baseDir . '/rules/Php80/ValueObject/CondAndExpr.php',
|
||||
'Rector\\Php80\\ValueObject\\DoctrineTagAndAnnotationToAttribute' => $baseDir . '/rules/Php80/ValueObject/DoctrineTagAndAnnotationToAttribute.php',
|
||||
'Rector\\Php80\\ValueObject\\MatchResult' => $baseDir . '/rules/Php80/ValueObject/MatchResult.php',
|
||||
@ -2395,12 +2393,10 @@ return array(
|
||||
'Rector\\Php81\\Enum\\AttributeName' => $baseDir . '/rules/Php81/Enum/AttributeName.php',
|
||||
'Rector\\Php81\\NodeAnalyzer\\CoalesePropertyAssignMatcher' => $baseDir . '/rules/Php81/NodeAnalyzer/CoalesePropertyAssignMatcher.php',
|
||||
'Rector\\Php81\\NodeAnalyzer\\ComplexNewAnalyzer' => $baseDir . '/rules/Php81/NodeAnalyzer/ComplexNewAnalyzer.php',
|
||||
'Rector\\Php81\\NodeAnalyzer\\EnumConstListClassDetector' => $baseDir . '/rules/Php81/NodeAnalyzer/EnumConstListClassDetector.php',
|
||||
'Rector\\Php81\\NodeFactory\\EnumFactory' => $baseDir . '/rules/Php81/NodeFactory/EnumFactory.php',
|
||||
'Rector\\Php81\\Rector\\Array_\\FirstClassCallableRector' => $baseDir . '/rules/Php81/Rector/Array_/FirstClassCallableRector.php',
|
||||
'Rector\\Php81\\Rector\\ClassConst\\FinalizePublicClassConstantRector' => $baseDir . '/rules/Php81/Rector/ClassConst/FinalizePublicClassConstantRector.php',
|
||||
'Rector\\Php81\\Rector\\ClassMethod\\NewInInitializerRector' => $baseDir . '/rules/Php81/Rector/ClassMethod/NewInInitializerRector.php',
|
||||
'Rector\\Php81\\Rector\\Class_\\ConstantListClassToEnumRector' => $baseDir . '/rules/Php81/Rector/Class_/ConstantListClassToEnumRector.php',
|
||||
'Rector\\Php81\\Rector\\Class_\\MyCLabsClassToEnumRector' => $baseDir . '/rules/Php81/Rector/Class_/MyCLabsClassToEnumRector.php',
|
||||
'Rector\\Php81\\Rector\\Class_\\SpatieEnumClassToEnumRector' => $baseDir . '/rules/Php81/Rector/Class_/SpatieEnumClassToEnumRector.php',
|
||||
'Rector\\Php81\\Rector\\FuncCall\\NullToStrictStringFuncCallArgRector' => $baseDir . '/rules/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector.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 ComposerAutoloaderInitf7a3ca1a50c7c647320f4111873f33ff
|
||||
class ComposerAutoloaderInit06a25b354321cf0b16cf6435b43f4254
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInitf7a3ca1a50c7c647320f4111873f33ff
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitf7a3ca1a50c7c647320f4111873f33ff', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit06a25b354321cf0b16cf6435b43f4254', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitf7a3ca1a50c7c647320f4111873f33ff', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit06a25b354321cf0b16cf6435b43f4254', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitf7a3ca1a50c7c647320f4111873f33ff::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit06a25b354321cf0b16cf6435b43f4254::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitf7a3ca1a50c7c647320f4111873f33ff::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit06a25b354321cf0b16cf6435b43f4254::$files;
|
||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
12
vendor/composer/autoload_static.php
vendored
12
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInitf7a3ca1a50c7c647320f4111873f33ff
|
||||
class ComposerStaticInit06a25b354321cf0b16cf6435b43f4254
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -2597,7 +2597,6 @@ class ComposerStaticInitf7a3ca1a50c7c647320f4111873f33ff
|
||||
'Rector\\Php80\\MatchAndRefactor\\StrStartsWithMatchAndRefactor\\StrposMatchAndRefactor' => __DIR__ . '/../..' . '/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/StrposMatchAndRefactor.php',
|
||||
'Rector\\Php80\\MatchAndRefactor\\StrStartsWithMatchAndRefactor\\SubstrMatchAndRefactor' => __DIR__ . '/../..' . '/rules/Php80/MatchAndRefactor/StrStartsWithMatchAndRefactor/SubstrMatchAndRefactor.php',
|
||||
'Rector\\Php80\\NodeAnalyzer\\AnnotationTargetResolver' => __DIR__ . '/../..' . '/rules/Php80/NodeAnalyzer/AnnotationTargetResolver.php',
|
||||
'Rector\\Php80\\NodeAnalyzer\\EnumParamAnalyzer' => __DIR__ . '/../..' . '/rules/Php80/NodeAnalyzer/EnumParamAnalyzer.php',
|
||||
'Rector\\Php80\\NodeAnalyzer\\MatchSwitchAnalyzer' => __DIR__ . '/../..' . '/rules/Php80/NodeAnalyzer/MatchSwitchAnalyzer.php',
|
||||
'Rector\\Php80\\NodeAnalyzer\\PhpAttributeAnalyzer' => __DIR__ . '/../..' . '/rules/Php80/NodeAnalyzer/PhpAttributeAnalyzer.php',
|
||||
'Rector\\Php80\\NodeAnalyzer\\PromotedPropertyCandidateResolver' => __DIR__ . '/../..' . '/rules/Php80/NodeAnalyzer/PromotedPropertyCandidateResolver.php',
|
||||
@ -2635,7 +2634,6 @@ class ComposerStaticInitf7a3ca1a50c7c647320f4111873f33ff
|
||||
'Rector\\Php80\\ValueObjectFactory\\StrStartsWithFactory' => __DIR__ . '/../..' . '/rules/Php80/ValueObjectFactory/StrStartsWithFactory.php',
|
||||
'Rector\\Php80\\ValueObject\\AnnotationPropertyToAttributeClass' => __DIR__ . '/../..' . '/rules/Php80/ValueObject/AnnotationPropertyToAttributeClass.php',
|
||||
'Rector\\Php80\\ValueObject\\AnnotationToAttribute' => __DIR__ . '/../..' . '/rules/Php80/ValueObject/AnnotationToAttribute.php',
|
||||
'Rector\\Php80\\ValueObject\\ClassNameAndTagValueNode' => __DIR__ . '/../..' . '/rules/Php80/ValueObject/ClassNameAndTagValueNode.php',
|
||||
'Rector\\Php80\\ValueObject\\CondAndExpr' => __DIR__ . '/../..' . '/rules/Php80/ValueObject/CondAndExpr.php',
|
||||
'Rector\\Php80\\ValueObject\\DoctrineTagAndAnnotationToAttribute' => __DIR__ . '/../..' . '/rules/Php80/ValueObject/DoctrineTagAndAnnotationToAttribute.php',
|
||||
'Rector\\Php80\\ValueObject\\MatchResult' => __DIR__ . '/../..' . '/rules/Php80/ValueObject/MatchResult.php',
|
||||
@ -2646,12 +2644,10 @@ class ComposerStaticInitf7a3ca1a50c7c647320f4111873f33ff
|
||||
'Rector\\Php81\\Enum\\AttributeName' => __DIR__ . '/../..' . '/rules/Php81/Enum/AttributeName.php',
|
||||
'Rector\\Php81\\NodeAnalyzer\\CoalesePropertyAssignMatcher' => __DIR__ . '/../..' . '/rules/Php81/NodeAnalyzer/CoalesePropertyAssignMatcher.php',
|
||||
'Rector\\Php81\\NodeAnalyzer\\ComplexNewAnalyzer' => __DIR__ . '/../..' . '/rules/Php81/NodeAnalyzer/ComplexNewAnalyzer.php',
|
||||
'Rector\\Php81\\NodeAnalyzer\\EnumConstListClassDetector' => __DIR__ . '/../..' . '/rules/Php81/NodeAnalyzer/EnumConstListClassDetector.php',
|
||||
'Rector\\Php81\\NodeFactory\\EnumFactory' => __DIR__ . '/../..' . '/rules/Php81/NodeFactory/EnumFactory.php',
|
||||
'Rector\\Php81\\Rector\\Array_\\FirstClassCallableRector' => __DIR__ . '/../..' . '/rules/Php81/Rector/Array_/FirstClassCallableRector.php',
|
||||
'Rector\\Php81\\Rector\\ClassConst\\FinalizePublicClassConstantRector' => __DIR__ . '/../..' . '/rules/Php81/Rector/ClassConst/FinalizePublicClassConstantRector.php',
|
||||
'Rector\\Php81\\Rector\\ClassMethod\\NewInInitializerRector' => __DIR__ . '/../..' . '/rules/Php81/Rector/ClassMethod/NewInInitializerRector.php',
|
||||
'Rector\\Php81\\Rector\\Class_\\ConstantListClassToEnumRector' => __DIR__ . '/../..' . '/rules/Php81/Rector/Class_/ConstantListClassToEnumRector.php',
|
||||
'Rector\\Php81\\Rector\\Class_\\MyCLabsClassToEnumRector' => __DIR__ . '/../..' . '/rules/Php81/Rector/Class_/MyCLabsClassToEnumRector.php',
|
||||
'Rector\\Php81\\Rector\\Class_\\SpatieEnumClassToEnumRector' => __DIR__ . '/../..' . '/rules/Php81/Rector/Class_/SpatieEnumClassToEnumRector.php',
|
||||
'Rector\\Php81\\Rector\\FuncCall\\NullToStrictStringFuncCallArgRector' => __DIR__ . '/../..' . '/rules/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector.php',
|
||||
@ -3185,9 +3181,9 @@ class ComposerStaticInitf7a3ca1a50c7c647320f4111873f33ff
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitf7a3ca1a50c7c647320f4111873f33ff::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitf7a3ca1a50c7c647320f4111873f33ff::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitf7a3ca1a50c7c647320f4111873f33ff::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit06a25b354321cf0b16cf6435b43f4254::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit06a25b354321cf0b16cf6435b43f4254::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit06a25b354321cf0b16cf6435b43f4254::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user