Updated Rector to commit 327144efdf

327144efdf [DowngradePhp80] Add return property downgrade case (#1415)
This commit is contained in:
Tomas Votruba 2021-12-07 19:04:47 +00:00
parent 1d7c52aecd
commit 0c19dc8049
8 changed files with 122 additions and 176 deletions

View File

@ -124,11 +124,9 @@ return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(ArgumentAdderRector::class)
->configure([
ArgumentAdderRector::ADDED_ARGUMENTS => [
new ArgumentAdder('SomeExampleClass', 'someMethod', 0, 'someArgument', true, new ObjectType('SomeType')),
],
]);
->configure(
[new ArgumentAdder('SomeExampleClass', 'someMethod', 0, 'someArgument', true, new ObjectType('SomeType'))]
);
};
```
@ -2600,11 +2598,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(AddPackageToRequireComposerRector::class)
->configure([
AddPackageToRequireComposerRector::PACKAGES_AND_VERSIONS => [
new PackageAndVersion('symfony/console', '^3.4'),
],
]);
->configure([new PackageAndVersion('symfony/console', '^3.4')]);
};
```
@ -2637,11 +2631,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(AddPackageToRequireDevComposerRector::class)
->configure([
AddPackageToRequireDevComposerRector::PACKAGES_AND_VERSIONS => [
new PackageAndVersion('symfony/console', '^3.4'),
],
]);
->configure([new PackageAndVersion('symfony/console', '^3.4')]);
};
```
@ -2674,11 +2664,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(ChangePackageVersionComposerRector::class)
->configure([
ChangePackageVersionComposerRector::PACKAGES_AND_VERSIONS => [
new PackageAndVersion('symfony/console', '^4.4'),
],
]);
->configure([new PackageAndVersion('symfony/console', '^4.4')]);
};
```
@ -2712,9 +2698,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(RemovePackageComposerRector::class)
->configure([
RemovePackageComposerRector::PACKAGE_NAMES => ['symfony/console'],
]);
->configure(['symfony/console']);
};
```
@ -2747,9 +2731,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(RenamePackageComposerRector::class)
->configure([
RenamePackageComposerRector::RENAME_PACKAGES => [new RenamePackage('rector/rector', 'rector/rector-src')],
]);
->configure([new RenamePackage('rector/rector', 'rector/rector-src')]);
};
```
@ -2783,11 +2765,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(ReplacePackageAndVersionComposerRector::class)
->configure([
ReplacePackageAndVersionComposerRector::REPLACE_PACKAGES_AND_VERSIONS => [
new ReplacePackageAndVersion('symfony/console', 'symfony/http-kernel', '^4.4'),
],
]);
->configure([new ReplacePackageAndVersion('symfony/console', 'symfony/http-kernel', '^4.4')]);
};
```
@ -5498,22 +5476,17 @@ Downgrade `str_starts_with()` to `strncmp()` version
### DowngradeThrowExprRector
Downgrade throw as expr
Downgrade throw expression
- class: [`Rector\DowngradePhp80\Rector\Expression\DowngradeThrowExprRector`](../rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php)
```diff
class SomeClass
{
public function run()
{
- $id = $somethingNonexistent ?? throw new RuntimeException();
+ if (!isset($somethingNonexistent)) {
+ throw new RuntimeException();
+ }
+ $id = $somethingNonexistent;
}
}
-echo $variable ?? throw new RuntimeException();
+if (! isset($variable)) {
+ throw new RuntimeException();
+}
+
+echo $variable;
```
<br>
@ -9129,9 +9102,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(RemoveFuncCallRector::class)
->configure([
RemoveFuncCallRector::REMOVE_FUNC_CALLS => [new RemoveFuncCall('ini_get', [['y2k_compliance']])],
]);
->configure([new RemoveFuncCall('ini_get', [['y2k_compliance']])]);
};
```
@ -9451,16 +9422,16 @@ Replaces defined class constants in their calls.
```php
use Rector\Renaming\Rector\ClassConstFetch\RenameClassConstFetchRector;
use Rector\Renaming\ValueObject\RenameClassAndConstFetch;
use Rector\Renaming\ValueObject\RenameClassConstFetch;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(RenameClassConstFetchRector::class)
->configure([new RenameClassConstFetch('SomeClass', 'OLD_CONSTANT', 'NEW_CONSTANT')])
->configure([
RenameClassConstFetchRector::CLASS_CONSTANT_RENAME => [
new RenameClassAndConstFetch('SomeClass', 'OTHER_OLD_CONSTANT', 'DifferentClass', 'NEW_CONSTANT'),
],
1 => new RenameClassAndConstFetch('SomeClass', 'OTHER_OLD_CONSTANT', 'DifferentClass', 'NEW_CONSTANT'),
]);
};
```
@ -9699,11 +9670,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(RenameStaticMethodRector::class)
->configure([
RenameStaticMethodRector::OLD_TO_NEW_METHODS_BY_CLASSES => [
new RenameStaticMethod('SomeClass', 'oldMethod', 'AnotherExampleClass', 'newStaticMethod'),
],
]);
->configure([new RenameStaticMethod('SomeClass', 'oldMethod', 'AnotherExampleClass', 'newStaticMethod')]);
};
```
@ -9716,32 +9683,6 @@ return static function (ContainerConfigurator $containerConfigurator): void {
<br>
```php
use Rector\Renaming\Rector\StaticCall\RenameStaticMethodRector;
use Rector\Renaming\ValueObject\RenameStaticMethod;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(RenameStaticMethodRector::class)
->configure([
RenameStaticMethodRector::OLD_TO_NEW_METHODS_BY_CLASSES => [
new RenameStaticMethod('SomeClass', 'oldMethod', 'SomeClass', 'newStaticMethod'),
],
]);
};
```
```diff
-SomeClass::oldStaticMethod();
+SomeClass::newStaticMethod();
```
<br>
### RenameStringRector
Change string value
@ -10992,10 +10933,9 @@ return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(PropertyFetchToMethodCallRector::class)
->configure([new PropertyFetchToMethodCall('SomeObject', 'property', 'getProperty', 'setProperty', [])])
->configure([
PropertyFetchToMethodCallRector::PROPERTIES_TO_METHOD_CALLS => [
new PropertyFetchToMethodCall('SomeObject', 'property', 'getProperty', 'setProperty', []),
],
1 => new PropertyFetchToMethodCall('SomeObject', 'bareProperty', 'getConfig', ['someArg']),
]);
};
```
@ -11007,32 +10947,9 @@ return static function (ContainerConfigurator $containerConfigurator): void {
-$object->property = $value;
+$result = $object->getProperty();
+$object->setProperty($value);
```
<br>
```php
use Rector\Transform\Rector\Assign\PropertyFetchToMethodCallRector;
use Rector\Transform\ValueObject\PropertyFetchToMethodCall;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(PropertyFetchToMethodCallRector::class)
->configure([
PropertyFetchToMethodCallRector::PROPERTIES_TO_METHOD_CALLS => [
new PropertyFetchToMethodCall('SomeObject', 'property', 'getConfig', ['someArg']),
],
]);
};
```
```diff
-$result = $object->property;
+$result = $object->getProperty('someArg');
-$bare = $object->bareProperty;
+$bare = $object->getConfig('someArg');
```
<br>
@ -11559,11 +11476,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(AddParamTypeDeclarationRector::class)
->configure([
AddParamTypeDeclarationRector::PARAMETER_TYPEHINTS => [
new AddParamTypeDeclaration('SomeClass', 'process', 0, new StringType()),
],
]);
->configure([new AddParamTypeDeclaration('SomeClass', 'process', 0, new StringType())]);
};
```
@ -11634,13 +11547,11 @@ return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(AddReturnTypeDeclarationRector::class)
->configure([
AddReturnTypeDeclarationRector::METHOD_RETURN_TYPES => [
new AddReturnTypeDeclaration('SomeClass', 'getData', new ArrayType(new MixedType(false), new MixedType(
false
))),
],
]);
->configure(
[new AddReturnTypeDeclaration('SomeClass', 'getData', new ArrayType(new MixedType(false), new MixedType(
false
)))]
);
};
```

View File

@ -6,12 +6,16 @@ namespace Rector\DowngradePhp80\Rector\Expression;
use PhpParser\Node;
use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\BinaryOp\Coalesce;
use PhpParser\Node\Expr\BinaryOp\Identical;
use PhpParser\Node\Expr\BooleanNot;
use PhpParser\Node\Expr\Isset_;
use PhpParser\Node\Expr\Ternary;
use PhpParser\Node\Expr\Throw_;
use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Stmt;
use PhpParser\Node\Stmt\Expression;
use PhpParser\Node\Stmt\If_;
use PhpParser\Node\Stmt\Return_;
use Rector\Core\NodeAnalyzer\CoalesceAnalyzer;
use Rector\Core\NodeManipulator\BinaryOpManipulator;
use Rector\Core\NodeManipulator\IfManipulator;
@ -48,26 +52,15 @@ final class DowngradeThrowExprRector extends \Rector\Core\Rector\AbstractRector
}
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
{
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Downgrade throw as expr', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample(<<<'CODE_SAMPLE'
class SomeClass
{
public function run()
{
$id = $somethingNonexistent ?? throw new RuntimeException();
}
}
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Downgrade throw expression', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample(<<<'CODE_SAMPLE'
echo $variable ?? throw new RuntimeException();
CODE_SAMPLE
, <<<'CODE_SAMPLE'
class SomeClass
{
public function run()
{
if (!isset($somethingNonexistent)) {
throw new RuntimeException();
}
$id = $somethingNonexistent;
}
if (! isset($variable)) {
throw new RuntimeException();
}
echo $variable;
CODE_SAMPLE
)]);
}
@ -76,47 +69,54 @@ CODE_SAMPLE
*/
public function getNodeTypes() : array
{
return [\PhpParser\Node\Stmt\Expression::class];
return [\PhpParser\Node\Stmt\Expression::class, \PhpParser\Node\Stmt\Return_::class];
}
/**
* @param Expression $node
* @param Expression|Return_ $node
* @return Node|Node[]|null
*/
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
public function refactor(\PhpParser\Node $node)
{
if ($node instanceof \PhpParser\Node\Stmt\Return_) {
return $this->refactorReturn($node);
}
if ($node->expr instanceof \PhpParser\Node\Expr\Throw_) {
return null;
}
if ($node->expr instanceof \PhpParser\Node\Expr\Assign) {
return $this->processAssign($node, $node->expr);
return $this->refactorAssign($node, $node->expr);
}
if ($node->expr instanceof \PhpParser\Node\Expr\BinaryOp\Coalesce) {
return $this->processCoalesce($node->expr, null);
return $this->refactorCoalesce($node->expr, null);
}
if ($node->expr instanceof \PhpParser\Node\Expr\Ternary) {
return $this->processTernary($node->expr, null);
return $this->refactorTernary($node->expr, null);
}
return $node;
return null;
}
/**
* @return \PhpParser\Node\Stmt\Expression|\PhpParser\Node\Stmt\If_|null
* @return mixed[]|\PhpParser\Node\Stmt\Expression|\PhpParser\Node\Stmt\If_|null
*/
private function processAssign(\PhpParser\Node\Stmt\Expression $expression, \PhpParser\Node\Expr\Assign $assign)
private function refactorAssign(\PhpParser\Node\Stmt\Expression $expression, \PhpParser\Node\Expr\Assign $assign)
{
if (!$this->hasThrowInAssignExpr($assign)) {
return null;
}
if ($assign->expr instanceof \PhpParser\Node\Expr\BinaryOp\Coalesce) {
return $this->processCoalesce($assign->expr, $assign);
return $this->refactorCoalesce($assign->expr, $assign);
}
if ($assign->expr instanceof \PhpParser\Node\Expr\Throw_) {
return new \PhpParser\Node\Stmt\Expression($assign->expr);
}
if ($assign->expr instanceof \PhpParser\Node\Expr\Ternary) {
return $this->processTernary($assign->expr, $assign);
return $this->refactorTernary($assign->expr, $assign);
}
return $expression;
}
private function processTernary(\PhpParser\Node\Expr\Ternary $ternary, ?\PhpParser\Node\Expr\Assign $assign) : ?\PhpParser\Node\Stmt\If_
/**
* @return mixed[]|\PhpParser\Node\Stmt\If_|null
*/
private function refactorTernary(\PhpParser\Node\Expr\Ternary $ternary, ?\PhpParser\Node\Expr\Assign $assign)
{
if (!$ternary->else instanceof \PhpParser\Node\Expr\Throw_) {
return null;
@ -127,10 +127,12 @@ CODE_SAMPLE
return $if;
}
$assign->expr = $ternary->if ?? $ternary->cond;
$this->nodesToAddCollector->addNodeAfterNode(new \PhpParser\Node\Stmt\Expression($assign), $if);
return $if;
return [$if, new \PhpParser\Node\Stmt\Expression($assign)];
}
private function processCoalesce(\PhpParser\Node\Expr\BinaryOp\Coalesce $coalesce, ?\PhpParser\Node\Expr\Assign $assign) : ?\PhpParser\Node\Stmt\If_
/**
* @return mixed[]|\PhpParser\Node\Stmt\If_|null
*/
private function refactorCoalesce(\PhpParser\Node\Expr\BinaryOp\Coalesce $coalesce, ?\PhpParser\Node\Expr\Assign $assign)
{
if (!$coalesce->right instanceof \PhpParser\Node\Expr\Throw_) {
return null;
@ -138,14 +140,13 @@ CODE_SAMPLE
if (!$this->coalesceAnalyzer->hasIssetableLeft($coalesce)) {
return null;
}
$booleanNot = new \PhpParser\Node\Expr\BooleanNot(new \PhpParser\Node\Expr\Isset_([$coalesce->left]));
$if = $this->ifManipulator->createIfExpr($booleanNot, new \PhpParser\Node\Stmt\Expression($coalesce->right));
$condExpr = $this->createCondExpr($coalesce);
$if = $this->ifManipulator->createIfExpr($condExpr, new \PhpParser\Node\Stmt\Expression($coalesce->right));
if (!$assign instanceof \PhpParser\Node\Expr\Assign) {
return $if;
}
$assign->expr = $coalesce->left;
$this->nodesToAddCollector->addNodeAfterNode(new \PhpParser\Node\Stmt\Expression($assign), $if);
return $if;
return [$if, new \PhpParser\Node\Stmt\Expression($assign)];
}
private function hasThrowInAssignExpr(\PhpParser\Node\Expr\Assign $assign) : bool
{
@ -153,4 +154,38 @@ CODE_SAMPLE
return $node instanceof \PhpParser\Node\Expr\Throw_;
});
}
/**
* @return Node[]|null
*/
private function refactorReturn(\PhpParser\Node\Stmt\Return_ $return) : ?array
{
$throwExpr = $this->betterNodeFinder->findFirstInstanceOf($return, \PhpParser\Node\Expr\Throw_::class);
if (!$throwExpr instanceof \PhpParser\Node\Expr\Throw_) {
return null;
}
if ($return->expr instanceof \PhpParser\Node\Expr\BinaryOp\Coalesce) {
$coalesce = $return->expr;
if (!$coalesce->right instanceof \PhpParser\Node\Expr\Throw_) {
return null;
}
$if = $this->createIf($coalesce, $coalesce->right);
return [$if, new \PhpParser\Node\Stmt\Return_($coalesce->left)];
}
return null;
}
private function createIf(\PhpParser\Node\Expr\BinaryOp\Coalesce $coalesce, \PhpParser\Node\Expr\Throw_ $throw) : \PhpParser\Node\Stmt\If_
{
$condExpr = $this->createCondExpr($coalesce);
return new \PhpParser\Node\Stmt\If_($condExpr, ['stmts' => [new \PhpParser\Node\Stmt\Expression($throw)]]);
}
/**
* @return \PhpParser\Node\Expr\BinaryOp\Identical|\PhpParser\Node\Expr\BooleanNot
*/
private function createCondExpr(\PhpParser\Node\Expr\BinaryOp\Coalesce $coalesce)
{
if ($coalesce->left instanceof \PhpParser\Node\Expr\Variable) {
return new \PhpParser\Node\Expr\BooleanNot(new \PhpParser\Node\Expr\Isset_([$coalesce->left]));
}
return new \PhpParser\Node\Expr\BinaryOp\Identical($coalesce->left, $this->nodeFactory->createNull());
}
}

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = 'a78fc170155be9aeb9e2188177c6260ede0571af';
public const PACKAGE_VERSION = '327144efdf82aac5249e20e114bcf5c69f0dd4c7';
/**
* @var string
*/
public const RELEASE_DATE = '2021-12-07 14:25:14';
public const RELEASE_DATE = '2021-12-07 18:48:15';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20211207\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

View File

@ -239,7 +239,7 @@ final class IfManipulator
public function createIfNegation(\PhpParser\Node\Expr $expr, \PhpParser\Node\Stmt $stmt) : \PhpParser\Node\Stmt\If_
{
$expr = $this->conditionInverter->createInvertedCondition($expr);
return new \PhpParser\Node\Stmt\If_($expr, ['stmts' => [$stmt]]);
return $this->createIfExpr($expr, $stmt);
}
public function createIfExpr(\PhpParser\Node\Expr $expr, \PhpParser\Node\Stmt $stmt) : \PhpParser\Node\Stmt\If_
{

2
vendor/autoload.php vendored
View File

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

View File

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

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit8ffc5d56bdbe60e58f0b896e69357b1b
class ComposerStaticInit0f32ea7e4b7a189f32724ee5a72b3471
{
public static $files = array (
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
@ -3787,9 +3787,9 @@ class ComposerStaticInit8ffc5d56bdbe60e58f0b896e69357b1b
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit8ffc5d56bdbe60e58f0b896e69357b1b::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit8ffc5d56bdbe60e58f0b896e69357b1b::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit8ffc5d56bdbe60e58f0b896e69357b1b::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit0f32ea7e4b7a189f32724ee5a72b3471::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit0f32ea7e4b7a189f32724ee5a72b3471::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit0f32ea7e4b7a189f32724ee5a72b3471::$classMap;
}, null, ClassLoader::class);
}

View File

@ -12,8 +12,8 @@ if (!class_exists('GenerateChangelogCommand', false) && !interface_exists('Gener
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
spl_autoload_call('RectorPrefix20211207\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInit8ffc5d56bdbe60e58f0b896e69357b1b', false) && !interface_exists('ComposerAutoloaderInit8ffc5d56bdbe60e58f0b896e69357b1b', false) && !trait_exists('ComposerAutoloaderInit8ffc5d56bdbe60e58f0b896e69357b1b', false)) {
spl_autoload_call('RectorPrefix20211207\ComposerAutoloaderInit8ffc5d56bdbe60e58f0b896e69357b1b');
if (!class_exists('ComposerAutoloaderInit0f32ea7e4b7a189f32724ee5a72b3471', false) && !interface_exists('ComposerAutoloaderInit0f32ea7e4b7a189f32724ee5a72b3471', false) && !trait_exists('ComposerAutoloaderInit0f32ea7e4b7a189f32724ee5a72b3471', false)) {
spl_autoload_call('RectorPrefix20211207\ComposerAutoloaderInit0f32ea7e4b7a189f32724ee5a72b3471');
}
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('RectorPrefix20211207\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -81,9 +81,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20211207\print_node(...func_get_args());
}
}
if (!function_exists('composerRequire8ffc5d56bdbe60e58f0b896e69357b1b')) {
function composerRequire8ffc5d56bdbe60e58f0b896e69357b1b() {
return \RectorPrefix20211207\composerRequire8ffc5d56bdbe60e58f0b896e69357b1b(...func_get_args());
if (!function_exists('composerRequire0f32ea7e4b7a189f32724ee5a72b3471')) {
function composerRequire0f32ea7e4b7a189f32724ee5a72b3471() {
return \RectorPrefix20211207\composerRequire0f32ea7e4b7a189f32724ee5a72b3471(...func_get_args());
}
}
if (!function_exists('scanPath')) {