Updated Rector to commit 7e55eaa7bf99a42b8bbd4c1b9b25ee2f7f1a7ab6

7e55eaa7bf Bump to newer phpstan-extensions (#5041)
This commit is contained in:
Tomas Votruba 2023-09-18 13:55:57 +00:00
parent fbe9c07e7a
commit caa99019bf
9 changed files with 39 additions and 46 deletions

2
vendor/autoload.php vendored
View File

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

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitc0355507ad71100305f52b250e75f20e
class ComposerAutoloaderInit95e10618837049af7f22028267366a4d
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInitc0355507ad71100305f52b250e75f20e
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitc0355507ad71100305f52b250e75f20e', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit95e10618837049af7f22028267366a4d', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitc0355507ad71100305f52b250e75f20e', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit95e10618837049af7f22028267366a4d', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitc0355507ad71100305f52b250e75f20e::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit95e10618837049af7f22028267366a4d::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInitc0355507ad71100305f52b250e75f20e::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit95e10618837049af7f22028267366a4d::$files;
$requireFile = \Closure::bind(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 ComposerStaticInitc0355507ad71100305f52b250e75f20e
class ComposerStaticInit95e10618837049af7f22028267366a4d
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -2593,9 +2593,9 @@ class ComposerStaticInitc0355507ad71100305f52b250e75f20e
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitc0355507ad71100305f52b250e75f20e::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitc0355507ad71100305f52b250e75f20e::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitc0355507ad71100305f52b250e75f20e::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit95e10618837049af7f22028267366a4d::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit95e10618837049af7f22028267366a4d::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit95e10618837049af7f22028267366a4d::$classMap;
}, null, ClassLoader::class);
}

View File

@ -858,17 +858,17 @@
},
{
"name": "phpstan\/phpdoc-parser",
"version": "1.24.0",
"version_normalized": "1.24.0.0",
"version": "1.24.1",
"version_normalized": "1.24.1.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/phpstan\/phpdoc-parser.git",
"reference": "3510b0a6274cc42f7219367cb3abfc123ffa09d6"
"reference": "9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpdoc-parser\/zipball\/3510b0a6274cc42f7219367cb3abfc123ffa09d6",
"reference": "3510b0a6274cc42f7219367cb3abfc123ffa09d6",
"url": "https:\/\/api.github.com\/repos\/phpstan\/phpdoc-parser\/zipball\/9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01",
"reference": "9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01",
"shasum": ""
},
"require": {
@ -885,7 +885,7 @@
"phpunit\/phpunit": "^9.5",
"symfony\/process": "^5.2"
},
"time": "2023-09-07T20:46:32+00:00",
"time": "2023-09-18T12:18:02+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -902,7 +902,7 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": {
"issues": "https:\/\/github.com\/phpstan\/phpdoc-parser\/issues",
"source": "https:\/\/github.com\/phpstan\/phpdoc-parser\/tree\/1.24.0"
"source": "https:\/\/github.com\/phpstan\/phpdoc-parser\/tree\/1.24.1"
},
"install-path": "..\/phpstan\/phpdoc-parser"
},
@ -1873,12 +1873,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git",
"reference": "2a9734abbc73619f2897162dea012ebef8200eba"
"reference": "0636ef226c788de3641dc33c6aaed9da35b56575"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/2a9734abbc73619f2897162dea012ebef8200eba",
"reference": "2a9734abbc73619f2897162dea012ebef8200eba",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/0636ef226c788de3641dc33c6aaed9da35b56575",
"reference": "0636ef226c788de3641dc33c6aaed9da35b56575",
"shasum": ""
},
"require": {
@ -1908,7 +1908,7 @@
"tomasvotruba\/unused-public": "^0.3",
"tracy\/tracy": "^2.10"
},
"time": "2023-09-13T15:00:43+00:00",
"time": "2023-09-18T13:51:22+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {

File diff suppressed because one or more lines are too long

View File

@ -10,11 +10,6 @@ parameters:
count: 1
path: src/Ast/NodeTraverser.php
-
message: "#^Strict comparison using \\=\\=\\= between 2 and 2 will always evaluate to true\\.$#"
count: 2
path: src/Ast/NodeTraverser.php
-
message: "#^Variable property access on PHPStan\\\\PhpDocParser\\\\Ast\\\\Node\\.$#"
count: 1

View File

@ -282,34 +282,26 @@ class TypeParser
public function parseGeneric(\PHPStan\PhpDocParser\Parser\TokenIterator $tokens, Ast\Type\IdentifierTypeNode $baseType) : Ast\Type\GenericTypeNode
{
$tokens->consumeTokenType(Lexer::TOKEN_OPEN_ANGLE_BRACKET);
$tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
$startLine = $baseType->getAttribute(Ast\Attribute::START_LINE);
$startIndex = $baseType->getAttribute(Ast\Attribute::START_INDEX);
$genericTypes = [];
$variances = [];
[$genericTypes[], $variances[]] = $this->parseGenericTypeArgument($tokens);
$tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
while ($tokens->tryConsumeTokenType(Lexer::TOKEN_COMMA)) {
$isFirst = \true;
while ($isFirst || $tokens->tryConsumeTokenType(Lexer::TOKEN_COMMA)) {
$tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
if ($tokens->tryConsumeTokenType(Lexer::TOKEN_CLOSE_ANGLE_BRACKET)) {
// trailing comma case
$type = new Ast\Type\GenericTypeNode($baseType, $genericTypes, $variances);
$startLine = $baseType->getAttribute(Ast\Attribute::START_LINE);
$startIndex = $baseType->getAttribute(Ast\Attribute::START_INDEX);
if ($startLine !== null && $startIndex !== null) {
$type = $this->enrichWithAttributes($tokens, $type, $startLine, $startIndex);
}
return $type;
// trailing comma case
if (!$isFirst && $tokens->isCurrentTokenType(Lexer::TOKEN_CLOSE_ANGLE_BRACKET)) {
break;
}
$isFirst = \false;
[$genericTypes[], $variances[]] = $this->parseGenericTypeArgument($tokens);
$tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
}
$tokens->tryConsumeTokenType(Lexer::TOKEN_PHPDOC_EOL);
$tokens->consumeTokenType(Lexer::TOKEN_CLOSE_ANGLE_BRACKET);
$type = new Ast\Type\GenericTypeNode($baseType, $genericTypes, $variances);
$startLine = $baseType->getAttribute(Ast\Attribute::START_LINE);
$startIndex = $baseType->getAttribute(Ast\Attribute::START_INDEX);
if ($startLine !== null && $startIndex !== null) {
$type = $this->enrichWithAttributes($tokens, $type, $startLine, $startIndex);
}
$tokens->consumeTokenType(Lexer::TOKEN_CLOSE_ANGLE_BRACKET);
return $type;
}
/**

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' => NULL, 'version' => 'dev-main 4b25180'), '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' => NULL, 'version' => 'dev-main 3782784'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main 2a9734a'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main 09ddd39'));
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' => NULL, 'version' => 'dev-main 4b25180'), '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' => NULL, 'version' => 'dev-main 3782784'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main 0636ef2'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main 09ddd39'));
private function __construct()
{
}

View File

@ -17,13 +17,15 @@ use PhpParser\Node\Scalar\LNumber;
use PhpParser\Node\Stmt\Expression;
use PhpParser\Node\Stmt\Return_;
use Rector\Core\Rector\AbstractRector;
use Rector\Core\ValueObject\PhpVersionFeature;
use Rector\PHPUnit\NodeAnalyzer\TestsNodeAnalyzer;
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
* @see \Rector\PHPUnit\Tests\Rector\StmtsAwareInterface\WithConsecutiveRector\WithConsecutiveRectorTest
*/
final class WithConsecutiveRector extends AbstractRector
final class WithConsecutiveRector extends AbstractRector implements MinPhpVersionInterface
{
/**
* @readonly
@ -150,4 +152,8 @@ CODE_SAMPLE
});
return $exactlyMethodCall;
}
public function provideMinPhpVersion() : int
{
return PhpVersionFeature::MATCH_EXPRESSION;
}
}