Updated Rector to commit 6bcdc92198

6bcdc92198 [Php80] Add Php8ResourceReturnToObjectRector (#1068)
This commit is contained in:
Tomas Votruba 2021-10-27 14:59:18 +00:00
parent f4d0c0a039
commit 0334d1bfd6
10 changed files with 311 additions and 19 deletions

View File

@ -15,6 +15,7 @@ use Rector\Php80\Rector\ClassMethod\FinalPrivateToPrivateVisibilityRector;
use Rector\Php80\Rector\ClassMethod\OptionalParametersAfterRequiredRector;
use Rector\Php80\Rector\ClassMethod\SetStateToStaticRector;
use Rector\Php80\Rector\FuncCall\ClassOnObjectRector;
use Rector\Php80\Rector\FuncCall\Php8ResourceReturnToObjectRector;
use Rector\Php80\Rector\FuncCall\TokenGetAllToObjectRector;
use Rector\Php80\Rector\FunctionLike\UnionTypesRector;
use Rector\Php80\Rector\Identical\StrEndsWithRector;
@ -50,4 +51,5 @@ return static function (\Symfony\Component\DependencyInjection\Loader\Configurat
$services->set(\Rector\Renaming\Rector\FuncCall\RenameFunctionRector::class)->call('configure', [[\Rector\Renaming\Rector\FuncCall\RenameFunctionRector::OLD_FUNCTION_TO_NEW_FUNCTION => ['pg_clientencoding' => 'pg_client_encoding', 'pg_cmdtuples' => 'pg_affected_rows', 'pg_errormessage' => 'pg_last_error', 'pg_fieldisnull' => 'pg_field_is_null', 'pg_fieldname' => 'pg_field_name', 'pg_fieldnum' => 'pg_field_num', 'pg_fieldprtlen' => 'pg_field_prtlen', 'pg_fieldsize' => 'pg_field_size', 'pg_fieldtype' => 'pg_field_type', 'pg_freeresult' => 'pg_free_result', 'pg_getlastoid' => 'pg_last_oid', 'pg_loclose' => 'pg_lo_close', 'pg_locreate' => 'pg_lo_create', 'pg_loexport' => 'pg_lo_export', 'pg_loimport' => 'pg_lo_import', 'pg_loopen' => 'pg_lo_open', 'pg_loread' => 'pg_lo_read', 'pg_loreadall' => 'pg_lo_read_all', 'pg_lounlink' => 'pg_lo_unlink', 'pg_lowrite' => 'pg_lo_write', 'pg_numfields' => 'pg_num_fields', 'pg_numrows' => 'pg_num_rows', 'pg_result' => 'pg_fetch_result', 'pg_setclientencoding' => 'pg_set_client_encoding']]]);
$services->set(\Rector\Php80\Rector\ClassMethod\OptionalParametersAfterRequiredRector::class);
$services->set(\Rector\Arguments\Rector\FuncCall\FunctionArgumentDefaultValueReplacerRector::class)->call('configure', [[\Rector\Arguments\Rector\FuncCall\FunctionArgumentDefaultValueReplacerRector::REPLACED_ARGUMENTS => \Symplify\SymfonyPhpConfig\ValueObjectInliner::inline([new \Rector\Arguments\ValueObject\ReplaceFuncCallArgumentDefaultValue('version_compare', 2, 'gte', 'ge'), new \Rector\Arguments\ValueObject\ReplaceFuncCallArgumentDefaultValue('version_compare', 2, 'lte', 'le'), new \Rector\Arguments\ValueObject\ReplaceFuncCallArgumentDefaultValue('version_compare', 2, '', '!='), new \Rector\Arguments\ValueObject\ReplaceFuncCallArgumentDefaultValue('version_compare', 2, '!', '!='), new \Rector\Arguments\ValueObject\ReplaceFuncCallArgumentDefaultValue('version_compare', 2, 'g', 'gt'), new \Rector\Arguments\ValueObject\ReplaceFuncCallArgumentDefaultValue('version_compare', 2, 'l', 'lt'), new \Rector\Arguments\ValueObject\ReplaceFuncCallArgumentDefaultValue('version_compare', 2, 'gte', 'ge'), new \Rector\Arguments\ValueObject\ReplaceFuncCallArgumentDefaultValue('version_compare', 2, 'lte', 'le'), new \Rector\Arguments\ValueObject\ReplaceFuncCallArgumentDefaultValue('version_compare', 2, 'n', 'ne')])]]);
$services->set(\Rector\Php80\Rector\FuncCall\Php8ResourceReturnToObjectRector::class);
};

View File

@ -7,6 +7,7 @@ use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\BinaryOp\BooleanAnd;
use PhpParser\Node\Expr\BinaryOp\BooleanOr;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\Instanceof_;
use PhpParser\Node\Stmt\If_;
use PhpParser\Node\Stmt\Return_;
@ -82,6 +83,10 @@ CODE_SAMPLE
if ($this->isInstanceofCondOnlyOrHasBooleanAnd($node->cond)) {
return null;
}
// maybe used along with Php8ResourceReturnToObjectRector rule
if ($this->isMaybeUsedAlongWithResourceToObjectRector($node->cond)) {
return null;
}
/** @var Return_ $return */
$return = $node->stmts[0];
$ifs = $this->createMultipleIfs($node->cond, $return, []);
@ -92,6 +97,22 @@ CODE_SAMPLE
$this->mirrorComments($ifs[0], $node);
return $ifs;
}
private function isMaybeUsedAlongWithResourceToObjectRector(\PhpParser\Node\Expr\BinaryOp\BooleanOr $booleanOr) : bool
{
if ($booleanOr->left instanceof \PhpParser\Node\Expr\FuncCall) {
if (!$this->nodeNameResolver->isName($booleanOr->left, 'is_resource')) {
return \false;
}
return $booleanOr->right instanceof \PhpParser\Node\Expr\Instanceof_;
}
if ($booleanOr->right instanceof \PhpParser\Node\Expr\FuncCall) {
if (!$this->nodeNameResolver->isName($booleanOr->right, 'is_resource')) {
return \false;
}
return $booleanOr->left instanceof \PhpParser\Node\Expr\Instanceof_;
}
return \false;
}
/**
* @param If_[] $ifs
* @return If_[]

View File

@ -0,0 +1,262 @@
<?php
declare (strict_types=1);
namespace Rector\Php80\Rector\FuncCall;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BinaryOp\BooleanOr;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\Instanceof_;
use PhpParser\Node\Name\FullyQualified;
use PHPStan\Type\Type;
use Rector\Core\Rector\AbstractRector;
use Rector\Core\ValueObject\PhpVersionFeature;
use Rector\NodeTypeResolver\Node\AttributeKey;
use Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedObjectType;
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @changelog https://www.php.net/manual/en/migration80.incompatible.php#migration80.incompatible.resource2object
*
* @see \Rector\Tests\Php80\Rector\FuncCall\Php8ResourceReturnToObjectRector\Php8ResourceReturnToObjectRectorTest
*/
final class Php8ResourceReturnToObjectRector extends \Rector\Core\Rector\AbstractRector implements \Rector\VersionBonding\Contract\MinPhpVersionInterface
{
/**
* @var array<string, string>
*/
private const COLLECTION_FUNCTION_TO_RETURN_OBJECT = [
// curl
'curl_init' => 'CurlHandle',
'curl_multi_init' => 'CurlMultiHandle',
'curl_share_init' => 'CurlShareHandle',
// socket
'socket_create' => 'Socket',
'socket_accept' => 'Socket',
'socket_addrinfo_bind' => 'Socket',
'socket_addrinfo_connect' => 'Socket',
'socket_create_listen' => 'Socket',
'socket_import_stream' => 'Socket',
'socket_wsaprotocol_info_import' => 'Socket',
// GD
'imagecreate' => 'GdImage',
'imagecreatefromavif' => 'GdImage',
'imagecreatefrombmp' => 'GdImage',
'imagecreatefromgd2' => 'GdImage',
'imagecreatefromgd2part' => 'GdImage',
'imagecreatefromgd' => 'GdImage',
'imagecreatefromgif' => 'GdImage',
'imagecreatefromjpeg' => 'GdImage',
'imagecreatefrompng' => 'GdImage',
'imagecreatefromstring' => 'GdImage',
'imagecreatefromtga' => 'GdImage',
'imagecreatefromwbmp' => 'GdImage',
'imagecreatefromwebp' => 'GdImage',
'imagecreatefromxbm' => 'GdImage',
'imagecreatefromxpm' => 'GdImage',
'imagecreatetruecolor' => 'GdImage',
'imagecrop' => 'GdImage',
'imagecropauto' => 'GdImage',
// XMLWriter
'xmlwriter_open_memory' => 'XMLWriter',
// XMLParser
'xml_parser_create' => 'XMLParser',
'xml_parser_create_ns' => 'XMLParser',
// Broker
'enchant_broker_init' => 'EnchantBroker',
'enchant_broker_request_dict' => 'EnchantDictionary',
'enchant_broker_request_pwl_dict' => 'EnchantDictionary',
// OpenSSL
'openssl_x509_read' => 'OpenSSLCertificate',
'openssl_csr_sign' => 'OpenSSLCertificate',
'openssl_csr_new' => 'OpenSSLCertificateSigningRequest',
'openssl_pkey_new' => 'OpenSSLAsymmetricKey',
// Shmop
'shmop_open' => 'Shmop',
// MessageQueue
'msg_get_queue' => 'SysvMessageQueue',
'sem_get' => 'SysvSemaphore',
'shm_attach' => 'SysvSharedMemory',
// Inflate Deflate
'inflate_init' => 'InflateContext',
'deflate_init' => 'DeflateContext',
];
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
{
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Change is_resource() to instanceof Object', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample(<<<'CODE_SAMPLE'
class SomeClass
{
public function run()
{
$ch = curl_init();
is_resource($ch);
}
}
CODE_SAMPLE
, <<<'CODE_SAMPLE'
class SomeClass
{
public function run()
{
$ch = curl_init();
$ch instanceof \CurlHandle;
}
}
CODE_SAMPLE
)]);
}
/**
* @return array<class-string<Node>>
*/
public function getNodeTypes() : array
{
return [\PhpParser\Node\Expr\FuncCall::class, \PhpParser\Node\Expr\BinaryOp\BooleanOr::class];
}
/**
* @param FuncCall|BooleanOr $node
*/
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
{
if ($node instanceof \PhpParser\Node\Expr\FuncCall) {
return $this->processFuncCall($node);
}
return $this->processBooleanOr($node);
}
public function provideMinPhpVersion() : int
{
return \Rector\Core\ValueObject\PhpVersionFeature::PHP8_RESOURCE_TO_OBJECT;
}
private function processFuncCall(\PhpParser\Node\Expr\FuncCall $funcCall) : ?\PhpParser\Node\Expr\Instanceof_
{
$parent = $funcCall->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE);
if ($parent instanceof \PhpParser\Node\Expr\BinaryOp && !$parent instanceof \PhpParser\Node\Expr\BinaryOp\BooleanOr) {
return null;
}
if ($this->shouldSkip($funcCall)) {
return null;
}
$objectInstanceCheck = $this->resolveObjectInstanceCheck($funcCall);
if ($objectInstanceCheck === null) {
return null;
}
/** @var Expr $argResourceValue */
$argResourceValue = $funcCall->args[0]->value;
return new \PhpParser\Node\Expr\Instanceof_($argResourceValue, new \PhpParser\Node\Name\FullyQualified($objectInstanceCheck));
}
private function resolveArgValueType(\PhpParser\Node\Expr\FuncCall $funcCall) : ?\PHPStan\Type\Type
{
/** @var Expr $argResourceValue */
$argResourceValue = $funcCall->args[0]->value;
$argValueType = $this->nodeTypeResolver->getType($argResourceValue);
// if detected type is not FullyQualifiedObjectType, it still can be a resource to object, when:
// - in the right position of BooleanOr, it be NeverType
// - the object changed after init
if (!$argValueType instanceof \Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedObjectType) {
$argValueType = $this->resolveArgValueTypeFromPreviousAssign($funcCall, $argResourceValue);
}
return $argValueType;
}
private function resolveObjectInstanceCheck(\PhpParser\Node\Expr\FuncCall $funcCall) : ?string
{
$argValueType = $this->resolveArgValueType($funcCall);
if (!$argValueType instanceof \Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedObjectType) {
return null;
}
$className = $argValueType->getClassName();
foreach (self::COLLECTION_FUNCTION_TO_RETURN_OBJECT as $value) {
if ($className === $value) {
return $value;
}
}
return null;
}
private function resolveArgValueTypeFromPreviousAssign(\PhpParser\Node\Expr\FuncCall $funcCall, \PhpParser\Node\Expr $expr) : ?\Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedObjectType
{
$objectInstanceCheck = null;
$assign = $this->betterNodeFinder->findFirstPreviousOfNode($funcCall, function (\PhpParser\Node $subNode) use(&$objectInstanceCheck, $expr) : bool {
if (!$this->isAssignWithFuncCallExpr($subNode)) {
return \false;
}
/** @var Assign $subNode */
if (!$this->nodeComparator->areNodesEqual($subNode->var, $expr)) {
return \false;
}
foreach (self::COLLECTION_FUNCTION_TO_RETURN_OBJECT as $key => $value) {
if ($this->nodeNameResolver->isName($subNode->expr, $key)) {
$objectInstanceCheck = $value;
return \true;
}
}
return \false;
});
if (!$assign instanceof \PhpParser\Node\Expr\Assign) {
return null;
}
/** @var string $objectInstanceCheck */
return new \Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedObjectType($objectInstanceCheck);
}
private function isAssignWithFuncCallExpr(\PhpParser\Node $node) : bool
{
if (!$node instanceof \PhpParser\Node\Expr\Assign) {
return \false;
}
return $node->expr instanceof \PhpParser\Node\Expr\FuncCall;
}
private function processBooleanOr(\PhpParser\Node\Expr\BinaryOp\BooleanOr $booleanOr) : ?\PhpParser\Node\Expr\Instanceof_
{
$left = $booleanOr->left;
$right = $booleanOr->right;
$funCall = null;
$instanceof = null;
if ($left instanceof \PhpParser\Node\Expr\FuncCall && $right instanceof \PhpParser\Node\Expr\Instanceof_) {
$funCall = $left;
$instanceof = $right;
} elseif ($left instanceof \PhpParser\Node\Expr\Instanceof_ && $right instanceof \PhpParser\Node\Expr\FuncCall) {
$funCall = $right;
$instanceof = $left;
} else {
return null;
}
/** @var FuncCall $funCall */
if ($this->shouldSkip($funCall)) {
return null;
}
$objectInstanceCheck = $this->resolveObjectInstanceCheck($funCall);
if ($objectInstanceCheck === null) {
return null;
}
/** @var Expr $argResourceValue */
$argResourceValue = $funCall->args[0]->value;
/** @var Instanceof_ $instanceof */
if (!$this->isInstanceOfObjectCheck($instanceof, $argResourceValue, $objectInstanceCheck)) {
return null;
}
return $instanceof;
}
private function isInstanceOfObjectCheck(\PhpParser\Node\Expr\Instanceof_ $instanceof, \PhpParser\Node\Expr $expr, string $objectInstanceCheck) : bool
{
if (!$instanceof->class instanceof \PhpParser\Node\Name\FullyQualified) {
return \false;
}
if (!$this->nodeComparator->areNodesEqual($expr, $instanceof->expr)) {
return \false;
}
return $this->nodeNameResolver->isName($instanceof->class, $objectInstanceCheck);
}
private function shouldSkip(\PhpParser\Node\Expr\FuncCall $funcCall) : bool
{
if (!$this->nodeNameResolver->isName($funcCall, 'is_resource')) {
return \true;
}
if (!isset($funcCall->args[0])) {
return \true;
}
$argResource = $funcCall->args[0];
return !$argResource instanceof \PhpParser\Node\Arg;
}
}

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '7b848a71112ed256f669e0f25f461aaee137a89e';
public const PACKAGE_VERSION = '6bcdc92198efbfbb3990844816f11d18e16833d7';
/**
* @var string
*/
public const RELEASE_DATE = '2021-10-27 15:44:37';
public const RELEASE_DATE = '2021-10-27 21:47:04';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20211027\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

View File

@ -415,4 +415,9 @@ final class PhpVersionFeature
* @var int
*/
public const NON_CAPTURING_CATCH = \Rector\Core\ValueObject\PhpVersion::PHP_80;
/**
* @see https://www.php.net/manual/en/migration80.incompatible.php#migration80.incompatible.resource2object
* @var int
*/
public const PHP8_RESOURCE_TO_OBJECT = \Rector\Core\ValueObject\PhpVersion::PHP_80;
}

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitf13e0c1963507c4c0ff17b1bdf5a7c35::getLoader();
return ComposerAutoloaderInit2b781a5eed2336297eb6a436061150c3::getLoader();

View File

@ -2777,6 +2777,7 @@ return array(
'Rector\\Php80\\Rector\\Class_\\DoctrineAnnotationClassToAttributeRector' => $baseDir . '/rules/Php80/Rector/Class_/DoctrineAnnotationClassToAttributeRector.php',
'Rector\\Php80\\Rector\\Class_\\StringableForToStringRector' => $baseDir . '/rules/Php80/Rector/Class_/StringableForToStringRector.php',
'Rector\\Php80\\Rector\\FuncCall\\ClassOnObjectRector' => $baseDir . '/rules/Php80/Rector/FuncCall/ClassOnObjectRector.php',
'Rector\\Php80\\Rector\\FuncCall\\Php8ResourceReturnToObjectRector' => $baseDir . '/rules/Php80/Rector/FuncCall/Php8ResourceReturnToObjectRector.php',
'Rector\\Php80\\Rector\\FuncCall\\TokenGetAllToObjectRector' => $baseDir . '/rules/Php80/Rector/FuncCall/TokenGetAllToObjectRector.php',
'Rector\\Php80\\Rector\\FunctionLike\\UnionTypesRector' => $baseDir . '/rules/Php80/Rector/FunctionLike/UnionTypesRector.php',
'Rector\\Php80\\Rector\\Identical\\StrEndsWithRector' => $baseDir . '/rules/Php80/Rector/Identical/StrEndsWithRector.php',

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitf13e0c1963507c4c0ff17b1bdf5a7c35
class ComposerAutoloaderInit2b781a5eed2336297eb6a436061150c3
{
private static $loader;
@ -22,15 +22,15 @@ class ComposerAutoloaderInitf13e0c1963507c4c0ff17b1bdf5a7c35
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitf13e0c1963507c4c0ff17b1bdf5a7c35', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit2b781a5eed2336297eb6a436061150c3', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInitf13e0c1963507c4c0ff17b1bdf5a7c35', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit2b781a5eed2336297eb6a436061150c3', '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\ComposerStaticInitf13e0c1963507c4c0ff17b1bdf5a7c35::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit2b781a5eed2336297eb6a436061150c3::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
@ -42,19 +42,19 @@ class ComposerAutoloaderInitf13e0c1963507c4c0ff17b1bdf5a7c35
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInitf13e0c1963507c4c0ff17b1bdf5a7c35::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit2b781a5eed2336297eb6a436061150c3::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequiref13e0c1963507c4c0ff17b1bdf5a7c35($fileIdentifier, $file);
composerRequire2b781a5eed2336297eb6a436061150c3($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequiref13e0c1963507c4c0ff17b1bdf5a7c35($fileIdentifier, $file)
function composerRequire2b781a5eed2336297eb6a436061150c3($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInitf13e0c1963507c4c0ff17b1bdf5a7c35
class ComposerStaticInit2b781a5eed2336297eb6a436061150c3
{
public static $files = array (
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
@ -3137,6 +3137,7 @@ class ComposerStaticInitf13e0c1963507c4c0ff17b1bdf5a7c35
'Rector\\Php80\\Rector\\Class_\\DoctrineAnnotationClassToAttributeRector' => __DIR__ . '/../..' . '/rules/Php80/Rector/Class_/DoctrineAnnotationClassToAttributeRector.php',
'Rector\\Php80\\Rector\\Class_\\StringableForToStringRector' => __DIR__ . '/../..' . '/rules/Php80/Rector/Class_/StringableForToStringRector.php',
'Rector\\Php80\\Rector\\FuncCall\\ClassOnObjectRector' => __DIR__ . '/../..' . '/rules/Php80/Rector/FuncCall/ClassOnObjectRector.php',
'Rector\\Php80\\Rector\\FuncCall\\Php8ResourceReturnToObjectRector' => __DIR__ . '/../..' . '/rules/Php80/Rector/FuncCall/Php8ResourceReturnToObjectRector.php',
'Rector\\Php80\\Rector\\FuncCall\\TokenGetAllToObjectRector' => __DIR__ . '/../..' . '/rules/Php80/Rector/FuncCall/TokenGetAllToObjectRector.php',
'Rector\\Php80\\Rector\\FunctionLike\\UnionTypesRector' => __DIR__ . '/../..' . '/rules/Php80/Rector/FunctionLike/UnionTypesRector.php',
'Rector\\Php80\\Rector\\Identical\\StrEndsWithRector' => __DIR__ . '/../..' . '/rules/Php80/Rector/Identical/StrEndsWithRector.php',
@ -3892,9 +3893,9 @@ class ComposerStaticInitf13e0c1963507c4c0ff17b1bdf5a7c35
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitf13e0c1963507c4c0ff17b1bdf5a7c35::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitf13e0c1963507c4c0ff17b1bdf5a7c35::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitf13e0c1963507c4c0ff17b1bdf5a7c35::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit2b781a5eed2336297eb6a436061150c3::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit2b781a5eed2336297eb6a436061150c3::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit2b781a5eed2336297eb6a436061150c3::$classMap;
}, null, ClassLoader::class);
}

View File

@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php';
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
spl_autoload_call('RectorPrefix20211027\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInitf13e0c1963507c4c0ff17b1bdf5a7c35', false) && !interface_exists('ComposerAutoloaderInitf13e0c1963507c4c0ff17b1bdf5a7c35', false) && !trait_exists('ComposerAutoloaderInitf13e0c1963507c4c0ff17b1bdf5a7c35', false)) {
spl_autoload_call('RectorPrefix20211027\ComposerAutoloaderInitf13e0c1963507c4c0ff17b1bdf5a7c35');
if (!class_exists('ComposerAutoloaderInit2b781a5eed2336297eb6a436061150c3', false) && !interface_exists('ComposerAutoloaderInit2b781a5eed2336297eb6a436061150c3', false) && !trait_exists('ComposerAutoloaderInit2b781a5eed2336297eb6a436061150c3', false)) {
spl_autoload_call('RectorPrefix20211027\ComposerAutoloaderInit2b781a5eed2336297eb6a436061150c3');
}
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('RectorPrefix20211027\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -3306,9 +3306,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20211027\print_node(...func_get_args());
}
}
if (!function_exists('composerRequiref13e0c1963507c4c0ff17b1bdf5a7c35')) {
function composerRequiref13e0c1963507c4c0ff17b1bdf5a7c35() {
return \RectorPrefix20211027\composerRequiref13e0c1963507c4c0ff17b1bdf5a7c35(...func_get_args());
if (!function_exists('composerRequire2b781a5eed2336297eb6a436061150c3')) {
function composerRequire2b781a5eed2336297eb6a436061150c3() {
return \RectorPrefix20211027\composerRequire2b781a5eed2336297eb6a436061150c3(...func_get_args());
}
}
if (!function_exists('parseArgs')) {