Updated Rector to commit 363908f477

363908f477 Fix phpstan configured parser to treat project with its code version (#1480)
This commit is contained in:
Tomas Votruba 2021-12-13 22:30:47 +00:00
parent 27fd5c38cf
commit db952265ef
7 changed files with 32 additions and 32 deletions

View File

@ -1,21 +1,21 @@
parameters:
phpVersion: 80100
# see original config.neon in phpstan.neon - https://github.com/phpstan/phpstan-src/blob/386eb913abb6ac05886c5642fd48b5d99db66a20/conf/config.neon#L1582
# this file overrides definitions from the config above
services:
defaultAnalysisParser:
factory: @cachedRectorParser
factory: @pathRoutingParser
arguments!: []
cachedRectorParser:
class: PHPStan\Parser\CachedParser
pathRoutingParser:
class: PHPStan\Parser\PathRoutingParser
arguments:
originalParser: @rectorParser
cachedNodesByStringCountMax: %cache.nodesByStringCountMax%
autowired: no
currentPhpVersionRichParser: @rectorParser
currentPhpVersionSimpleParser: @rectorParser
php8Parser: @php8Parser
autowired: false
rectorParser:
class: PHPStan\Parser\RichParser
arguments:
parser: @php8PhpParser
lexer: @php8Lexer
parser: @currentPhpVersionPhpParser
lexer: @currentPhpVersionLexer
autowired: no

View File

@ -81,10 +81,10 @@ CODE_SAMPLE
return null;
}
/** @var Arg $firstArg */
$firstArg = $node->args[0];
$firstArg = $node->getArgs()[0];
$firstArgValue = $firstArg->value;
/** @var Arg $secondArg */
$secondArg = $node->args[1];
$secondArg = $node->getArgs()[1];
$secondArgValue = $secondArg->value;
if ($firstArgValue instanceof \PhpParser\Node\Scalar\String_) {
$functionName = $this->valueResolver->getValue($firstArgValue);

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '2d4ac921207f17e26fd8524abb1936b7dd8a0371';
public const PACKAGE_VERSION = '363908f47774ef1f9d003d0946ea5f3439c8b44b';
/**
* @var string
*/
public const RELEASE_DATE = '2021-12-13 21:37:59';
public const RELEASE_DATE = '2021-12-13 23:14:27';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20211213\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

2
vendor/autoload.php vendored
View File

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

View File

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

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit3c51500a239543f2dafd426319004d36
class ComposerStaticInit77b42fb7174dfbd5cc630ec3033fd413
{
public static $files = array (
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
@ -3822,9 +3822,9 @@ class ComposerStaticInit3c51500a239543f2dafd426319004d36
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit3c51500a239543f2dafd426319004d36::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit3c51500a239543f2dafd426319004d36::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit3c51500a239543f2dafd426319004d36::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit77b42fb7174dfbd5cc630ec3033fd413::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit77b42fb7174dfbd5cc630ec3033fd413::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit77b42fb7174dfbd5cc630ec3033fd413::$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('RectorPrefix20211213\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInit3c51500a239543f2dafd426319004d36', false) && !interface_exists('ComposerAutoloaderInit3c51500a239543f2dafd426319004d36', false) && !trait_exists('ComposerAutoloaderInit3c51500a239543f2dafd426319004d36', false)) {
spl_autoload_call('RectorPrefix20211213\ComposerAutoloaderInit3c51500a239543f2dafd426319004d36');
if (!class_exists('ComposerAutoloaderInit77b42fb7174dfbd5cc630ec3033fd413', false) && !interface_exists('ComposerAutoloaderInit77b42fb7174dfbd5cc630ec3033fd413', false) && !trait_exists('ComposerAutoloaderInit77b42fb7174dfbd5cc630ec3033fd413', false)) {
spl_autoload_call('RectorPrefix20211213\ComposerAutoloaderInit77b42fb7174dfbd5cc630ec3033fd413');
}
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('RectorPrefix20211213\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -81,9 +81,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20211213\print_node(...func_get_args());
}
}
if (!function_exists('composerRequire3c51500a239543f2dafd426319004d36')) {
function composerRequire3c51500a239543f2dafd426319004d36() {
return \RectorPrefix20211213\composerRequire3c51500a239543f2dafd426319004d36(...func_get_args());
if (!function_exists('composerRequire77b42fb7174dfbd5cc630ec3033fd413')) {
function composerRequire77b42fb7174dfbd5cc630ec3033fd413() {
return \RectorPrefix20211213\composerRequire77b42fb7174dfbd5cc630ec3033fd413(...func_get_args());
}
}
if (!function_exists('scanPath')) {