Updated Rector to commit 3f0dc2aee83ec3249e2aa1fba70dc89bed8a9227

3f0dc2aee8 remove NamedVariableFactory
This commit is contained in:
Tomas Votruba 2023-01-15 01:10:38 +00:00
parent b000cd08e5
commit 838e4d7b3f
17 changed files with 39 additions and 41 deletions

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'f6463a551369f884954c0f7dbc8b423e7d29d8e4';
public const PACKAGE_VERSION = '3f0dc2aee83ec3249e2aa1fba70dc89bed8a9227';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-01-15 01:04:45';
public const RELEASE_DATE = '2023-01-15 01:06:42';
/**
* @var int
*/

2
vendor/autoload.php vendored
View File

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit479783b998d61cb0717211847faacdb7::getLoader();
return ComposerAutoloaderInit2900543936600a9f7c79cd4022d8df33::getLoader();

View File

@ -1475,7 +1475,6 @@ return array(
'Rector\\Core\\PhpParser\\Node\\AssignAndBinaryMap' => $baseDir . '/src/PhpParser/Node/AssignAndBinaryMap.php',
'Rector\\Core\\PhpParser\\Node\\BetterNodeFinder' => $baseDir . '/src/PhpParser/Node/BetterNodeFinder.php',
'Rector\\Core\\PhpParser\\Node\\CustomNode\\FileWithoutNamespace' => $baseDir . '/src/PhpParser/Node/CustomNode/FileWithoutNamespace.php',
'Rector\\Core\\PhpParser\\Node\\NamedVariableFactory' => $baseDir . '/src/PhpParser/Node/NamedVariableFactory.php',
'Rector\\Core\\PhpParser\\Node\\NodeFactory' => $baseDir . '/src/PhpParser/Node/NodeFactory.php',
'Rector\\Core\\PhpParser\\Node\\Value\\ValueResolver' => $baseDir . '/src/PhpParser/Node/Value/ValueResolver.php',
'Rector\\Core\\PhpParser\\Parser\\InlineCodeParser' => $baseDir . '/src/PhpParser/Parser/InlineCodeParser.php',
@ -1899,6 +1898,7 @@ return array(
'Rector\\NodeCollector\\ValueObject\\ArrayCallableDynamicMethod' => $baseDir . '/packages/NodeCollector/ValueObject/ArrayCallableDynamicMethod.php',
'Rector\\NodeFactory\\ClassFromEnumFactory' => $vendorDir . '/rector/rector-downgrade-php/src/NodeFactory/ClassFromEnumFactory.php',
'Rector\\NodeFactory\\DoctrineAnnotationFactory' => $vendorDir . '/rector/rector-downgrade-php/src/NodeFactory/DoctrineAnnotationFactory.php',
'Rector\\NodeFactory\\NamedVariableFactory' => $vendorDir . '/rector/rector-downgrade-php/src/NodeFactory/NamedVariableFactory.php',
'Rector\\NodeManipulator\\PropertyDecorator' => $vendorDir . '/rector/rector-downgrade-php/src/NodeManipulator/PropertyDecorator.php',
'Rector\\NodeNameResolver\\Contract\\NodeNameResolverInterface' => $baseDir . '/packages/NodeNameResolver/Contract/NodeNameResolverInterface.php',
'Rector\\NodeNameResolver\\Error\\InvalidNameNodeReporter' => $baseDir . '/packages/NodeNameResolver/Error/InvalidNameNodeReporter.php',

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit479783b998d61cb0717211847faacdb7
class ComposerAutoloaderInit2900543936600a9f7c79cd4022d8df33
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInit479783b998d61cb0717211847faacdb7
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit479783b998d61cb0717211847faacdb7', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit2900543936600a9f7c79cd4022d8df33', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit479783b998d61cb0717211847faacdb7', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit2900543936600a9f7c79cd4022d8df33', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit479783b998d61cb0717211847faacdb7::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit2900543936600a9f7c79cd4022d8df33::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit479783b998d61cb0717211847faacdb7::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit2900543936600a9f7c79cd4022d8df33::$files;
$requireFile = static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit479783b998d61cb0717211847faacdb7
class ComposerStaticInit2900543936600a9f7c79cd4022d8df33
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -1720,7 +1720,6 @@ class ComposerStaticInit479783b998d61cb0717211847faacdb7
'Rector\\Core\\PhpParser\\Node\\AssignAndBinaryMap' => __DIR__ . '/../..' . '/src/PhpParser/Node/AssignAndBinaryMap.php',
'Rector\\Core\\PhpParser\\Node\\BetterNodeFinder' => __DIR__ . '/../..' . '/src/PhpParser/Node/BetterNodeFinder.php',
'Rector\\Core\\PhpParser\\Node\\CustomNode\\FileWithoutNamespace' => __DIR__ . '/../..' . '/src/PhpParser/Node/CustomNode/FileWithoutNamespace.php',
'Rector\\Core\\PhpParser\\Node\\NamedVariableFactory' => __DIR__ . '/../..' . '/src/PhpParser/Node/NamedVariableFactory.php',
'Rector\\Core\\PhpParser\\Node\\NodeFactory' => __DIR__ . '/../..' . '/src/PhpParser/Node/NodeFactory.php',
'Rector\\Core\\PhpParser\\Node\\Value\\ValueResolver' => __DIR__ . '/../..' . '/src/PhpParser/Node/Value/ValueResolver.php',
'Rector\\Core\\PhpParser\\Parser\\InlineCodeParser' => __DIR__ . '/../..' . '/src/PhpParser/Parser/InlineCodeParser.php',
@ -2144,6 +2143,7 @@ class ComposerStaticInit479783b998d61cb0717211847faacdb7
'Rector\\NodeCollector\\ValueObject\\ArrayCallableDynamicMethod' => __DIR__ . '/../..' . '/packages/NodeCollector/ValueObject/ArrayCallableDynamicMethod.php',
'Rector\\NodeFactory\\ClassFromEnumFactory' => __DIR__ . '/..' . '/rector/rector-downgrade-php/src/NodeFactory/ClassFromEnumFactory.php',
'Rector\\NodeFactory\\DoctrineAnnotationFactory' => __DIR__ . '/..' . '/rector/rector-downgrade-php/src/NodeFactory/DoctrineAnnotationFactory.php',
'Rector\\NodeFactory\\NamedVariableFactory' => __DIR__ . '/..' . '/rector/rector-downgrade-php/src/NodeFactory/NamedVariableFactory.php',
'Rector\\NodeManipulator\\PropertyDecorator' => __DIR__ . '/..' . '/rector/rector-downgrade-php/src/NodeManipulator/PropertyDecorator.php',
'Rector\\NodeNameResolver\\Contract\\NodeNameResolverInterface' => __DIR__ . '/../..' . '/packages/NodeNameResolver/Contract/NodeNameResolverInterface.php',
'Rector\\NodeNameResolver\\Error\\InvalidNameNodeReporter' => __DIR__ . '/../..' . '/packages/NodeNameResolver/Error/InvalidNameNodeReporter.php',
@ -3066,9 +3066,9 @@ class ComposerStaticInit479783b998d61cb0717211847faacdb7
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit479783b998d61cb0717211847faacdb7::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit479783b998d61cb0717211847faacdb7::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit479783b998d61cb0717211847faacdb7::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit2900543936600a9f7c79cd4022d8df33::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit2900543936600a9f7c79cd4022d8df33::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit2900543936600a9f7c79cd4022d8df33::$classMap;
}, null, ClassLoader::class);
}

View File

@ -1913,12 +1913,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
"reference": "151dff9e9ab3a938abfb86538b7ef1aca75bc131"
"reference": "27b8868f0874d9621d3667c083a7dc3c40094e07"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/151dff9e9ab3a938abfb86538b7ef1aca75bc131",
"reference": "151dff9e9ab3a938abfb86538b7ef1aca75bc131",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/27b8868f0874d9621d3667c083a7dc3c40094e07",
"reference": "27b8868f0874d9621d3667c083a7dc3c40094e07",
"shasum": ""
},
"require": {
@ -1944,7 +1944,7 @@
"symplify\/rule-doc-generator": "^11.1",
"symplify\/vendor-patches": "^11.1"
},
"time": "2023-01-15T01:01:40+00:00",
"time": "2023-01-15T01:06:52+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
*/
final class GeneratedConfig
{
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main f0c3c11'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 151dff9'), 'rector/rector-php-parser' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-php-parser', 'relative_install_path' => '../../rector-php-parser', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 9ea5f62'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 2cfc0a5'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 3b132c1'));
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main f0c3c11'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 27b8868'), 'rector/rector-php-parser' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-php-parser', 'relative_install_path' => '../../rector-php-parser', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 9ea5f62'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 2cfc0a5'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 3b132c1'));
private function __construct()
{
}

View File

@ -14,9 +14,9 @@ use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Expression;
use PhpParser\Node\Stmt\Function_;
use PHPStan\Reflection\Php\PhpPropertyReflection;
use Rector\Core\PhpParser\Node\NamedVariableFactory;
use Rector\Core\Rector\AbstractRector;
use Rector\Core\Reflection\ReflectionResolver;
use Rector\NodeFactory\NamedVariableFactory;
use Rector\PostRector\Collector\NodesToAddCollector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
@ -29,7 +29,7 @@ final class DowngradeThisInClosureRector extends AbstractRector
{
/**
* @readonly
* @var \Rector\Core\PhpParser\Node\NamedVariableFactory
* @var \Rector\NodeFactory\NamedVariableFactory
*/
private $namedVariableFactory;
/**

View File

@ -11,8 +11,8 @@ use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\New_;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Stmt\Expression;
use Rector\Core\PhpParser\Node\NamedVariableFactory;
use Rector\Core\Rector\AbstractRector;
use Rector\NodeFactory\NamedVariableFactory;
use Rector\NodeTypeResolver\Node\AttributeKey;
use Rector\PostRector\Collector\NodesToAddCollector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
@ -26,7 +26,7 @@ final class DowngradeInstanceMethodCallRector extends AbstractRector
{
/**
* @readonly
* @var \Rector\Core\PhpParser\Node\NamedVariableFactory
* @var \Rector\NodeFactory\NamedVariableFactory
*/
private $namedVariableFactory;
/**

View File

@ -8,8 +8,8 @@ use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\List_;
use PhpParser\Node\Stmt\Expression;
use PhpParser\Node\Stmt\Foreach_;
use Rector\Core\PhpParser\Node\NamedVariableFactory;
use Rector\Core\Rector\AbstractRector;
use Rector\NodeFactory\NamedVariableFactory;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
@ -21,7 +21,7 @@ final class DowngradeForeachListRector extends AbstractRector
{
/**
* @readonly
* @var \Rector\Core\PhpParser\Node\NamedVariableFactory
* @var \Rector\NodeFactory\NamedVariableFactory
*/
private $namedVariableFactory;
public function __construct(NamedVariableFactory $namedVariableFactory)

View File

@ -19,8 +19,8 @@ use PhpParser\Node\Scalar\LNumber;
use PhpParser\Node\Stmt\Expression;
use PhpParser\Node\Stmt\Return_;
use PhpParser\Node\Stmt\While_;
use Rector\Core\PhpParser\Node\NamedVariableFactory;
use Rector\Core\Rector\AbstractRector;
use Rector\NodeFactory\NamedVariableFactory;
use Rector\PostRector\Collector\NodesToAddCollector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
@ -37,7 +37,7 @@ final class DowngradeDirnameLevelsRector extends AbstractRector
private const DIRNAME = 'dirname';
/**
* @readonly
* @var \Rector\Core\PhpParser\Node\NamedVariableFactory
* @var \Rector\NodeFactory\NamedVariableFactory
*/
private $namedVariableFactory;
/**

View File

@ -10,10 +10,10 @@ use PhpParser\Node\Expr\Instanceof_;
use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Name;
use PhpParser\Node\Name\FullyQualified;
use Rector\Core\PhpParser\Node\NamedVariableFactory;
use Rector\Core\Rector\AbstractRector;
use Rector\NodeCollector\BinaryOpConditionsCollector;
use Rector\NodeCollector\BinaryOpTreeRootLocator;
use Rector\NodeFactory\NamedVariableFactory;
use Rector\NodeTypeResolver\Node\AttributeKey;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
@ -36,7 +36,7 @@ final class DowngradeInstanceofThrowableRector extends AbstractRector
private $binaryOpTreeRootLocator;
/**
* @readonly
* @var \Rector\Core\PhpParser\Node\NamedVariableFactory
* @var \Rector\NodeFactory\NamedVariableFactory
*/
private $namedVariableFactory;
public function __construct(BinaryOpConditionsCollector $binaryOpConditionsCollector, BinaryOpTreeRootLocator $binaryOpTreeRootLocator, NamedVariableFactory $namedVariableFactory)

View File

@ -18,8 +18,8 @@ use PhpParser\Node\Scalar\LNumber;
use PhpParser\Node\Stmt\Expression;
use PhpParser\Node\Stmt\Return_;
use Rector\Core\NodeManipulator\IfManipulator;
use Rector\Core\PhpParser\Node\NamedVariableFactory;
use Rector\Core\Rector\AbstractRector;
use Rector\NodeFactory\NamedVariableFactory;
use Rector\PostRector\Collector\NodesToAddCollector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
@ -35,7 +35,7 @@ final class DowngradeSpaceshipRector extends AbstractRector
private $ifManipulator;
/**
* @readonly
* @var \Rector\Core\PhpParser\Node\NamedVariableFactory
* @var \Rector\NodeFactory\NamedVariableFactory
*/
private $namedVariableFactory;
/**

View File

@ -12,8 +12,8 @@ use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\StaticCall;
use PhpParser\Node\Stmt\Expression;
use PhpParser\Node\Stmt\Return_;
use Rector\Core\PhpParser\Node\NamedVariableFactory;
use Rector\Core\Rector\AbstractRector;
use Rector\NodeFactory\NamedVariableFactory;
use Rector\PostRector\Collector\NodesToAddCollector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
@ -26,7 +26,7 @@ final class DowngradeClosureFromCallableRector extends AbstractRector
{
/**
* @readonly
* @var \Rector\Core\PhpParser\Node\NamedVariableFactory
* @var \Rector\NodeFactory\NamedVariableFactory
*/
private $namedVariableFactory;
/**

View File

@ -14,8 +14,8 @@ use PhpParser\Node\Expr\New_;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Expr\StaticPropertyFetch;
use PhpParser\Node\Expr\Variable;
use Rector\Core\PhpParser\Node\NamedVariableFactory;
use Rector\Core\Rector\AbstractRector;
use Rector\NodeFactory\NamedVariableFactory;
use Rector\NodeTypeResolver\Node\AttributeKey;
use Rector\PostRector\Collector\NodesToAddCollector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
@ -29,7 +29,7 @@ final class DowngradeArbitraryExpressionsSupportRector extends AbstractRector
{
/**
* @readonly
* @var \Rector\Core\PhpParser\Node\NamedVariableFactory
* @var \Rector\NodeFactory\NamedVariableFactory
*/
private $namedVariableFactory;
/**

View File

@ -1,11 +1,12 @@
<?php
declare (strict_types=1);
namespace Rector\Core\PhpParser\Node;
namespace Rector\NodeFactory;
use PhpParser\Node;
use PhpParser\Node\Expr\Variable;
use Rector\Core\Exception\ShouldNotHappenException;
use Rector\Core\PhpParser\Node\BetterNodeFinder;
use Rector\Naming\Naming\VariableNaming;
use Rector\NodeTypeResolver\Node\AttributeKey;
final class NamedVariableFactory
@ -20,14 +21,11 @@ final class NamedVariableFactory
* @var \Rector\Core\PhpParser\Node\BetterNodeFinder
*/
private $betterNodeFinder;
public function __construct(VariableNaming $variableNaming, \Rector\Core\PhpParser\Node\BetterNodeFinder $betterNodeFinder)
public function __construct(VariableNaming $variableNaming, BetterNodeFinder $betterNodeFinder)
{
$this->variableNaming = $variableNaming;
$this->betterNodeFinder = $betterNodeFinder;
}
/**
* @api downgrade
*/
public function createVariable(Node $node, string $variableName) : Variable
{
$currentStmt = $this->betterNodeFinder->resolveCurrentStatement($node);