Updated Rector to commit c0e95a0233

c0e95a0233 Unrelated cherry picks from PHPStan 1.0 upgrade (#1057)
This commit is contained in:
Tomas Votruba 2021-10-25 14:24:14 +00:00
parent b3f23cffbf
commit 5dadc46e95
19 changed files with 93 additions and 86 deletions

View File

@ -105,22 +105,22 @@ final class FamilyRelationsAnalyzer
}
/** @var ClassReflection $classReflection */
$classReflection = $scope->getClassReflection();
$ancestors = $classReflection->getAncestors();
$ancestorClassReflections = $classReflection->getAncestors();
$propertyName = $this->nodeNameResolver->getName($property);
$kindPropertyFetch = $this->getKindPropertyFetch($property);
$className = $property->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::CLASS_NAME);
foreach ($ancestors as $ancestor) {
$ancestorName = $ancestor->getName();
if ($ancestorName === $className) {
foreach ($ancestorClassReflections as $ancestorClassReflection) {
$ancestorClassName = $ancestorClassReflection->getName();
if ($ancestorClassName === $className) {
continue;
}
$fileName = $ancestor->getFileName();
$fileName = $ancestorClassReflection->getFileName();
if ($fileName === \false) {
continue;
}
$fileContent = $this->smartFileSystem->readFile($fileName);
$nodes = $this->parser->parse($fileContent);
if ($ancestor->isSubclassOf('PHPUnit\\Framework\\TestCase')) {
if ($ancestorClassReflection->isSubclassOf('PHPUnit\\Framework\\TestCase')) {
continue;
}
if ($nodes === null) {

View File

@ -110,6 +110,9 @@ CODE_SAMPLE
continue;
}
/** @var If_ $stmt */
if ($stmt->stmts === null) {
continue;
}
if (\count($stmt->stmts) === 1) {
$node->stmts[$key] = $stmt->stmts[0];
continue;

View File

@ -9,5 +9,5 @@ final class ObjectMagicMethods
/**
* @var string[]
*/
public const METHOD_NAMES = ['__call', '__callStatic', \Rector\Core\ValueObject\MethodName::CLONE, \Rector\Core\ValueObject\MethodName::CONSTRUCT, '__debugInfo', \Rector\Core\ValueObject\MethodName::DESCTRUCT, '__get', '__invoke', '__isset', '__serialize', '__set', \Rector\Core\ValueObject\MethodName::SET_STATE, '__sleep', '__toString', '__unserialize', '__unset', '__wakeup'];
public const METHOD_NAMES = ['__call', '__callStatic', \Rector\Core\ValueObject\MethodName::CLONE, \Rector\Core\ValueObject\MethodName::CONSTRUCT, '__debugInfo', \Rector\Core\ValueObject\MethodName::DESCTRUCT, '__get', \Rector\Core\ValueObject\MethodName::INVOKE, '__isset', '__serialize', '__set', \Rector\Core\ValueObject\MethodName::SET_STATE, '__sleep', '__toString', '__unserialize', '__unset', '__wakeup'];
}

View File

@ -4,7 +4,6 @@ declare (strict_types=1);
namespace Rector\DowngradePhp80\Rector\Expression;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\BinaryOp\Coalesce;
use PhpParser\Node\Expr\BooleanNot;
@ -120,9 +119,6 @@ CODE_SAMPLE
return null;
}
$inversedTernaryCond = $this->binaryOpManipulator->inverseNode($ternary->cond);
if (!$inversedTernaryCond instanceof \PhpParser\Node\Expr) {
return null;
}
$if = $this->ifManipulator->createIfExpr($inversedTernaryCond, new \PhpParser\Node\Stmt\Expression($ternary->else));
if (!$assign instanceof \PhpParser\Node\Expr\Assign) {
return $if;

View File

@ -74,6 +74,9 @@ final class TernaryToNullCoalescingRector extends \Rector\Core\Rector\AbstractRe
if ($ternary->if === null) {
return null;
}
if ($isset->vars === null) {
return null;
}
// none or multiple isset values cannot be handled here
if (!isset($isset->vars[0])) {
return null;
@ -81,10 +84,10 @@ final class TernaryToNullCoalescingRector extends \Rector\Core\Rector\AbstractRe
if (\count($isset->vars) > 1) {
return null;
}
if ($this->nodeComparator->areNodesEqual($ternary->if, $isset->vars[0])) {
return new \PhpParser\Node\Expr\BinaryOp\Coalesce($ternary->if, $ternary->else);
if (!$this->nodeComparator->areNodesEqual($ternary->if, $isset->vars[0])) {
return null;
}
return null;
return new \PhpParser\Node\Expr\BinaryOp\Coalesce($ternary->if, $ternary->else);
}
private function isNullMatch(\PhpParser\Node\Expr $possibleNullExpr, \PhpParser\Node\Expr $firstNode, \PhpParser\Node\Expr $secondNode) : bool
{

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = 'fd72d082337152b5c606775396b6f444eaf7b088';
public const PACKAGE_VERSION = 'c0e95a02334240be0055efd4105afcffa738ce88';
/**
* @var string
*/
public const RELEASE_DATE = '2021-10-25 15:26:52';
public const RELEASE_DATE = '2021-10-25 16:10:14';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20211025\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

View File

@ -78,11 +78,14 @@ final class BinaryOpManipulator
}
return new $inversedNodeClass($binaryOp->left, $binaryOp->right);
}
public function inverseNode(\PhpParser\Node\Expr $expr) : \PhpParser\Node
/**
* @return \PhpParser\Node\Expr\BinaryOp|\PhpParser\Node\Expr|\PhpParser\Node\Expr\BooleanNot
*/
public function inverseNode(\PhpParser\Node\Expr $expr)
{
if ($expr instanceof \PhpParser\Node\Expr\BinaryOp) {
$inversedBinaryOp = $this->assignAndBinaryMap->getInversed($expr);
if ($inversedBinaryOp) {
if ($inversedBinaryOp !== null) {
return new $inversedBinaryOp($expr->left, $expr->right);
}
}
@ -116,6 +119,9 @@ final class BinaryOpManipulator
return \is_a($node, $condition, \true);
};
}
/**
* @return class-string<BinaryOp>|null
*/
private function resolveInversedNodeClass(\PhpParser\Node\Expr\BinaryOp $binaryOp) : ?string
{
$inversedNodeClass = $this->assignAndBinaryMap->getInversed($binaryOp);

View File

@ -16,6 +16,7 @@ use PhpParser\Node\Param;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Expression;
use PhpParser\Node\Stmt\Foreach_;
use PhpParser\NodeFinder;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParameterReflection;
use PHPStan\Type\Type;
@ -25,7 +26,6 @@ use Rector\Core\PhpParser\Node\NodeFactory;
use Rector\Core\Reflection\ReflectionResolver;
use Rector\NodeNameResolver\NodeNameResolver;
use Rector\NodeTypeResolver\Node\AttributeKey;
use RectorPrefix20211025\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser;
final class ClassMethodAssignManipulator
{
/**
@ -36,10 +36,6 @@ final class ClassMethodAssignManipulator
* @var \Rector\Core\PhpParser\Node\BetterNodeFinder
*/
private $betterNodeFinder;
/**
* @var \Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser
*/
private $simpleCallableNodeTraverser;
/**
* @var \Rector\Core\PhpParser\Node\NodeFactory
*/
@ -60,19 +56,23 @@ final class ClassMethodAssignManipulator
* @var \Rector\Core\Reflection\ReflectionResolver
*/
private $reflectionResolver;
/**
* @var \PhpParser\NodeFinder
*/
private $nodeFinder;
/**
* @var \Rector\Core\NodeManipulator\ArrayDestructVariableFilter
*/
private $arrayDestructVariableFilter;
public function __construct(\Rector\Core\PhpParser\Node\BetterNodeFinder $betterNodeFinder, \RectorPrefix20211025\Symplify\Astral\NodeTraverser\SimpleCallableNodeTraverser $simpleCallableNodeTraverser, \Rector\Core\PhpParser\Node\NodeFactory $nodeFactory, \Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver, \Rector\Core\NodeManipulator\VariableManipulator $variableManipulator, \Rector\Core\PhpParser\Comparing\NodeComparator $nodeComparator, \Rector\Core\Reflection\ReflectionResolver $reflectionResolver, \Rector\Core\NodeManipulator\ArrayDestructVariableFilter $arrayDestructVariableFilter)
public function __construct(\Rector\Core\PhpParser\Node\BetterNodeFinder $betterNodeFinder, \Rector\Core\PhpParser\Node\NodeFactory $nodeFactory, \Rector\NodeNameResolver\NodeNameResolver $nodeNameResolver, \Rector\Core\NodeManipulator\VariableManipulator $variableManipulator, \Rector\Core\PhpParser\Comparing\NodeComparator $nodeComparator, \Rector\Core\Reflection\ReflectionResolver $reflectionResolver, \PhpParser\NodeFinder $nodeFinder, \Rector\Core\NodeManipulator\ArrayDestructVariableFilter $arrayDestructVariableFilter)
{
$this->betterNodeFinder = $betterNodeFinder;
$this->simpleCallableNodeTraverser = $simpleCallableNodeTraverser;
$this->nodeFactory = $nodeFactory;
$this->nodeNameResolver = $nodeNameResolver;
$this->variableManipulator = $variableManipulator;
$this->nodeComparator = $nodeComparator;
$this->reflectionResolver = $reflectionResolver;
$this->nodeFinder = $nodeFinder;
$this->arrayDestructVariableFilter = $arrayDestructVariableFilter;
}
/**
@ -162,37 +162,41 @@ final class ClassMethodAssignManipulator
private function collectReferenceVariableNames(\PhpParser\Node\Stmt\ClassMethod $classMethod) : array
{
$referencedVariables = [];
$this->simpleCallableNodeTraverser->traverseNodesWithCallable($classMethod, function (\PhpParser\Node $node) use(&$referencedVariables) {
if (!$node instanceof \PhpParser\Node\Expr\Variable) {
return null;
/** @var Variable[] $variables */
$variables = $this->nodeFinder->findInstanceOf($classMethod, \PhpParser\Node\Expr\Variable::class);
foreach ($variables as $variable) {
if ($this->nodeNameResolver->isName($variable, 'this')) {
continue;
}
if ($this->nodeNameResolver->isName($node, 'this')) {
return null;
}
$parentNode = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE);
if ($parentNode !== null && $this->isExplicitlyReferenced($parentNode)) {
/** @var string $variableName */
$variableName = $this->nodeNameResolver->getName($node);
$parent = $variable->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE);
if ($parent !== null && $this->isExplicitlyReferenced($parent)) {
$variableName = $this->nodeNameResolver->getName($variable);
if ($variableName === null) {
continue;
}
$referencedVariables[] = $variableName;
return null;
continue;
}
$argumentPosition = null;
if ($parentNode instanceof \PhpParser\Node\Arg) {
$argumentPosition = $parentNode->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::ARGUMENT_POSITION);
$parentNode = $parentNode->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE);
if ($parent instanceof \PhpParser\Node\Arg) {
$argumentPosition = $parent->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::ARGUMENT_POSITION);
$parent = $parent->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE);
}
if (!$parentNode instanceof \PhpParser\Node) {
return null;
if (!$parent instanceof \PhpParser\Node) {
continue;
}
if ($argumentPosition === null) {
return null;
continue;
}
/** @var string $variableName */
$variableName = $this->nodeNameResolver->getName($node);
if ($this->isCallOrConstructorWithReference($parentNode, $node, $argumentPosition)) {
$referencedVariables[] = $variableName;
$variableName = $this->nodeNameResolver->getName($variable);
if ($variableName === null) {
continue;
}
});
if (!$this->isCallOrConstructorWithReference($parent, $variable, $argumentPosition)) {
continue;
}
$referencedVariables[] = $variableName;
}
return $referencedVariables;
}
private function findParentForeach(\PhpParser\Node\Expr\Assign $assign) : ?\PhpParser\Node\Stmt\Foreach_

View File

@ -9,6 +9,7 @@ use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use Rector\Core\Contract\PHPStan\Reflection\TypeToCallReflectionResolver\TypeToCallReflectionResolverInterface;
use Rector\Core\ValueObject\MethodName;
/**
* @see https://github.com/phpstan/phpstan-src/blob/b1fd47bda2a7a7d25091197b125c0adf82af6757/src/Type/ObjectType.php#L705
*/
@ -40,9 +41,9 @@ final class ObjectTypeToCallReflectionResolver implements \Rector\Core\Contract\
return null;
}
$classReflection = $this->reflectionProvider->getClass($className);
if (!$classReflection->hasNativeMethod('__invoke')) {
if (!$classReflection->hasNativeMethod(\Rector\Core\ValueObject\MethodName::INVOKE)) {
return null;
}
return $classReflection->getNativeMethod('__invoke');
return $classReflection->getNativeMethod(\Rector\Core\ValueObject\MethodName::INVOKE);
}
}

View File

@ -51,7 +51,7 @@ final class AssignAndBinaryMap
*/
private const BINARY_OP_TO_INVERSE_CLASSES = [\PhpParser\Node\Expr\BinaryOp\Identical::class => \PhpParser\Node\Expr\BinaryOp\NotIdentical::class, \PhpParser\Node\Expr\BinaryOp\NotIdentical::class => \PhpParser\Node\Expr\BinaryOp\Identical::class, \PhpParser\Node\Expr\BinaryOp\Equal::class => \PhpParser\Node\Expr\BinaryOp\NotEqual::class, \PhpParser\Node\Expr\BinaryOp\NotEqual::class => \PhpParser\Node\Expr\BinaryOp\Equal::class, \PhpParser\Node\Expr\BinaryOp\Greater::class => \PhpParser\Node\Expr\BinaryOp\SmallerOrEqual::class, \PhpParser\Node\Expr\BinaryOp\Smaller::class => \PhpParser\Node\Expr\BinaryOp\GreaterOrEqual::class, \PhpParser\Node\Expr\BinaryOp\GreaterOrEqual::class => \PhpParser\Node\Expr\BinaryOp\Smaller::class, \PhpParser\Node\Expr\BinaryOp\SmallerOrEqual::class => \PhpParser\Node\Expr\BinaryOp\Greater::class];
/**
* @var array<class-string<AssignOp>, class-string<AssignOp>>
* @var array<class-string<AssignOp>, class-string<BinaryOp>>
*/
private const ASSIGN_OP_TO_BINARY_OP_CLASSES = [\PhpParser\Node\Expr\AssignOp\BitwiseOr::class => \PhpParser\Node\Expr\BinaryOp\BitwiseOr::class, \PhpParser\Node\Expr\AssignOp\BitwiseAnd::class => \PhpParser\Node\Expr\BinaryOp\BitwiseAnd::class, \PhpParser\Node\Expr\AssignOp\BitwiseXor::class => \PhpParser\Node\Expr\BinaryOp\BitwiseXor::class, \PhpParser\Node\Expr\AssignOp\Plus::class => \PhpParser\Node\Expr\BinaryOp\Plus::class, \PhpParser\Node\Expr\AssignOp\Div::class => \PhpParser\Node\Expr\BinaryOp\Div::class, \PhpParser\Node\Expr\AssignOp\Mul::class => \PhpParser\Node\Expr\BinaryOp\Mul::class, \PhpParser\Node\Expr\AssignOp\Minus::class => \PhpParser\Node\Expr\BinaryOp\Minus::class, \PhpParser\Node\Expr\AssignOp\Concat::class => \PhpParser\Node\Expr\BinaryOp\Concat::class, \PhpParser\Node\Expr\AssignOp\Pow::class => \PhpParser\Node\Expr\BinaryOp\Pow::class, \PhpParser\Node\Expr\AssignOp\Mod::class => \PhpParser\Node\Expr\BinaryOp\Mod::class, \PhpParser\Node\Expr\AssignOp\ShiftLeft::class => \PhpParser\Node\Expr\BinaryOp\ShiftLeft::class, \PhpParser\Node\Expr\AssignOp\ShiftRight::class => \PhpParser\Node\Expr\BinaryOp\ShiftRight::class];
/**
@ -62,6 +62,9 @@ final class AssignAndBinaryMap
{
$this->binaryOpToAssignClasses = \array_flip(self::ASSIGN_OP_TO_BINARY_OP_CLASSES);
}
/**
* @return class-string<BinaryOp>|null
*/
public function getAlternative(\PhpParser\Node $node) : ?string
{
$nodeClass = \get_class($node);
@ -73,6 +76,9 @@ final class AssignAndBinaryMap
}
return null;
}
/**
* @return class-string<BinaryOp>|null
*/
public function getInversed(\PhpParser\Node\Expr\BinaryOp $binaryOp) : ?string
{
$nodeClass = \get_class($binaryOp);

View File

@ -328,7 +328,6 @@ final class NodeFactory
return $methodBuilder->getNode();
}
/**
* @todo decouple to StackNodeFactory
* @param Expr[] $exprs
*/
public function createConcat(array $exprs) : ?\PhpParser\Node\Expr\BinaryOp\Concat
@ -505,7 +504,7 @@ final class NodeFactory
$arrayItem = new \PhpParser\Node\Expr\ArrayItem($item->value);
}
if ($arrayItem !== null) {
$this->decoreateArrayItemWithKey($key, $arrayItem);
$this->decorateArrayItemWithKey($key, $arrayItem);
return $arrayItem;
}
$nodeClass = \is_object($item) ? \get_class($item) : $item;
@ -525,7 +524,7 @@ final class NodeFactory
/**
* @param int|string|null $key
*/
private function decoreateArrayItemWithKey($key, \PhpParser\Node\Expr\ArrayItem $arrayItem) : void
private function decorateArrayItemWithKey($key, \PhpParser\Node\Expr\ArrayItem $arrayItem) : void
{
if ($key !== null) {
$arrayItem->key = \PhpParser\BuilderHelpers::normalizeValue($key);

2
vendor/autoload.php vendored
View File

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

View File

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

View File

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

View File

@ -3805,12 +3805,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/symplify\/astral.git",
"reference": "810a0c74edc7fb1a73d8f3eac3ea714199460f7b"
"reference": "e583ee48dbb665d42f93921b496b660758c593a9"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/symplify\/astral\/zipball\/810a0c74edc7fb1a73d8f3eac3ea714199460f7b",
"reference": "810a0c74edc7fb1a73d8f3eac3ea714199460f7b",
"url": "https:\/\/api.github.com\/repos\/symplify\/astral\/zipball\/e583ee48dbb665d42f93921b496b660758c593a9",
"reference": "e583ee48dbb665d42f93921b496b660758c593a9",
"shasum": ""
},
"require": {
@ -3820,7 +3820,6 @@
"phpstan\/phpstan": "^0.12.99",
"symfony\/dependency-injection": "^5.3|^6.0",
"symfony\/http-kernel": "^5.3|^6.0",
"symplify\/autowire-array-parameter": "^9.5",
"symplify\/package-builder": "^9.5",
"symplify\/smart-file-system": "^9.5"
},
@ -3858,7 +3857,7 @@
"phpunit\/phpunit": "^9.5",
"symplify\/easy-testing": "^9.5"
},
"time": "2021-10-25T12:12:10+00:00",
"time": "2021-10-25T13:49:49+00:00",
"default-branch": true,
"type": "phpstan-extension",
"extra": {

File diff suppressed because one or more lines are too long

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('RectorPrefix20211025\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInitbbe1f2119a47f582d3b4c07d361fdb9d', false) && !interface_exists('ComposerAutoloaderInitbbe1f2119a47f582d3b4c07d361fdb9d', false) && !trait_exists('ComposerAutoloaderInitbbe1f2119a47f582d3b4c07d361fdb9d', false)) {
spl_autoload_call('RectorPrefix20211025\ComposerAutoloaderInitbbe1f2119a47f582d3b4c07d361fdb9d');
if (!class_exists('ComposerAutoloaderInit5d40734f8675fcb6c7638424fb0f3580', false) && !interface_exists('ComposerAutoloaderInit5d40734f8675fcb6c7638424fb0f3580', false) && !trait_exists('ComposerAutoloaderInit5d40734f8675fcb6c7638424fb0f3580', false)) {
spl_autoload_call('RectorPrefix20211025\ComposerAutoloaderInit5d40734f8675fcb6c7638424fb0f3580');
}
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('RectorPrefix20211025\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -3306,9 +3306,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20211025\print_node(...func_get_args());
}
}
if (!function_exists('composerRequirebbe1f2119a47f582d3b4c07d361fdb9d')) {
function composerRequirebbe1f2119a47f582d3b4c07d361fdb9d() {
return \RectorPrefix20211025\composerRequirebbe1f2119a47f582d3b4c07d361fdb9d(...func_get_args());
if (!function_exists('composerRequire5d40734f8675fcb6c7638424fb0f3580')) {
function composerRequire5d40734f8675fcb6c7638424fb0f3580() {
return \RectorPrefix20211025\composerRequire5d40734f8675fcb6c7638424fb0f3580(...func_get_args());
}
}
if (!function_exists('parseArgs')) {

View File

@ -7,7 +7,6 @@
"php": ">=8.0",
"nette\/utils": "^3.2",
"symfony\/dependency-injection": "^5.3|^6.0",
"symplify\/autowire-array-parameter": "^9.5",
"symplify\/smart-file-system": "^9.5",
"phpstan\/phpstan": "^0.12.99",
"symfony\/http-kernel": "^5.3|^6.0",

View File

@ -3,19 +3,10 @@
declare (strict_types=1);
namespace RectorPrefix20211025\Symplify\Astral\Bundle;
use RectorPrefix20211025\Symfony\Component\DependencyInjection\ContainerBuilder;
use RectorPrefix20211025\Symfony\Component\HttpKernel\Bundle\Bundle;
use RectorPrefix20211025\Symplify\Astral\DependencyInjection\Extension\AstralExtension;
use RectorPrefix20211025\Symplify\AutowireArrayParameter\DependencyInjection\CompilerPass\AutowireArrayParameterCompilerPass;
final class AstralBundle extends \RectorPrefix20211025\Symfony\Component\HttpKernel\Bundle\Bundle
{
/**
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $containerBuilder
*/
public function build($containerBuilder) : void
{
$containerBuilder->addCompilerPass(new \RectorPrefix20211025\Symplify\AutowireArrayParameter\DependencyInjection\CompilerPass\AutowireArrayParameterCompilerPass());
}
protected function createContainerExtension() : ?\RectorPrefix20211025\Symfony\Component\DependencyInjection\Extension\ExtensionInterface
{
return new \RectorPrefix20211025\Symplify\Astral\DependencyInjection\Extension\AstralExtension();