Updated Rector to commit 3d2732790dbe972d9b8be88fbb7ddccfac118c8e

3d2732790d [Core] Fixing applied rules not shown when refactor() only change docblock (#1861)
This commit is contained in:
Tomas Votruba 2022-02-24 14:28:35 +00:00
parent eecb24a948
commit 8f37054aa8
7 changed files with 29 additions and 23 deletions

View File

@ -121,6 +121,10 @@ final class ClassRenamer
if ($node instanceof \PhpParser\Node\Stmt\ClassLike) {
return $this->refactorClassLike($node, $oldToNewClasses);
}
$phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node);
if ($phpDocInfo->hasChanged()) {
return $node;
}
return null;
}
/**

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = 'bb4a9068c23321c711cc7d7ce881116ef4dd36a2';
public const PACKAGE_VERSION = '3d2732790dbe972d9b8be88fbb7ddccfac118c8e';
/**
* @var string
*/
public const RELEASE_DATE = '2022-02-24 20:23:49';
public const RELEASE_DATE = '2022-02-24 21:20:23';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20220224\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

View File

@ -247,10 +247,9 @@ abstract class AbstractRector extends \PhpParser\NodeVisitorAbstract implements
if ($this->isNothingToChange($node)) {
return null;
}
$this->applyRectorWithLineChange($originalNode);
/** @var Node $originalNode */
if (\is_array($node)) {
$rectorWithLineChange = new \Rector\ChangesReporting\ValueObject\RectorWithLineChange(\get_class($this), $originalNode->getLine());
$this->file->addRectorClassWithLine($rectorWithLineChange);
/** @var array<Node> $node */
$this->createdByRuleDecorator->decorate($node, $originalNode, static::class);
$originalNodeHash = \spl_object_hash($originalNode);
@ -266,8 +265,6 @@ abstract class AbstractRector extends \PhpParser\NodeVisitorAbstract implements
if (!$this->changedNodeAnalyzer->hasNodeChanged($originalNode, $node)) {
return $node;
}
$rectorWithLineChange = new \Rector\ChangesReporting\ValueObject\RectorWithLineChange(\get_class($this), $originalNode->getLine());
$this->file->addRectorClassWithLine($rectorWithLineChange);
// update parents relations - must run before connectParentNodes()
$this->mirrorAttributes($originalAttributes, $node);
$this->connectParentNodes($node);
@ -410,6 +407,11 @@ abstract class AbstractRector extends \PhpParser\NodeVisitorAbstract implements
{
$this->nodeRemover->removeNodes($nodes);
}
private function applyRectorWithLineChange(\PhpParser\Node $originalNode) : void
{
$rectorWithLineChange = new \Rector\ChangesReporting\ValueObject\RectorWithLineChange(\get_class($this), $originalNode->getLine());
$this->file->addRectorClassWithLine($rectorWithLineChange);
}
/**
* @param mixed[]|\PhpParser\Node|null $node
*/

2
vendor/autoload.php vendored
View File

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

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitea11cbccb22f8f20652289b75a67b11f
class ComposerAutoloaderInita574e7deb357bbdaea33e9951531c2a5
{
private static $loader;
@ -22,15 +22,15 @@ class ComposerAutoloaderInitea11cbccb22f8f20652289b75a67b11f
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitea11cbccb22f8f20652289b75a67b11f', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInita574e7deb357bbdaea33e9951531c2a5', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInitea11cbccb22f8f20652289b75a67b11f', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInita574e7deb357bbdaea33e9951531c2a5', '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\ComposerStaticInitea11cbccb22f8f20652289b75a67b11f::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInita574e7deb357bbdaea33e9951531c2a5::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
@ -42,12 +42,12 @@ class ComposerAutoloaderInitea11cbccb22f8f20652289b75a67b11f
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInitea11cbccb22f8f20652289b75a67b11f::$files;
$includeFiles = Composer\Autoload\ComposerStaticInita574e7deb357bbdaea33e9951531c2a5::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequireea11cbccb22f8f20652289b75a67b11f($fileIdentifier, $file);
composerRequirea574e7deb357bbdaea33e9951531c2a5($fileIdentifier, $file);
}
return $loader;
@ -59,7 +59,7 @@ class ComposerAutoloaderInitea11cbccb22f8f20652289b75a67b11f
* @param string $file
* @return void
*/
function composerRequireea11cbccb22f8f20652289b75a67b11f($fileIdentifier, $file)
function composerRequirea574e7deb357bbdaea33e9951531c2a5($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 ComposerStaticInitea11cbccb22f8f20652289b75a67b11f
class ComposerStaticInita574e7deb357bbdaea33e9951531c2a5
{
public static $files = array (
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
@ -3849,9 +3849,9 @@ class ComposerStaticInitea11cbccb22f8f20652289b75a67b11f
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitea11cbccb22f8f20652289b75a67b11f::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitea11cbccb22f8f20652289b75a67b11f::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitea11cbccb22f8f20652289b75a67b11f::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInita574e7deb357bbdaea33e9951531c2a5::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInita574e7deb357bbdaea33e9951531c2a5::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInita574e7deb357bbdaea33e9951531c2a5::$classMap;
}, null, ClassLoader::class);
}

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('RectorPrefix20220224\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInitea11cbccb22f8f20652289b75a67b11f', false) && !interface_exists('ComposerAutoloaderInitea11cbccb22f8f20652289b75a67b11f', false) && !trait_exists('ComposerAutoloaderInitea11cbccb22f8f20652289b75a67b11f', false)) {
spl_autoload_call('RectorPrefix20220224\ComposerAutoloaderInitea11cbccb22f8f20652289b75a67b11f');
if (!class_exists('ComposerAutoloaderInita574e7deb357bbdaea33e9951531c2a5', false) && !interface_exists('ComposerAutoloaderInita574e7deb357bbdaea33e9951531c2a5', false) && !trait_exists('ComposerAutoloaderInita574e7deb357bbdaea33e9951531c2a5', false)) {
spl_autoload_call('RectorPrefix20220224\ComposerAutoloaderInita574e7deb357bbdaea33e9951531c2a5');
}
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('RectorPrefix20220224\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -59,9 +59,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20220224\print_node(...func_get_args());
}
}
if (!function_exists('composerRequireea11cbccb22f8f20652289b75a67b11f')) {
function composerRequireea11cbccb22f8f20652289b75a67b11f() {
return \RectorPrefix20220224\composerRequireea11cbccb22f8f20652289b75a67b11f(...func_get_args());
if (!function_exists('composerRequirea574e7deb357bbdaea33e9951531c2a5')) {
function composerRequirea574e7deb357bbdaea33e9951531c2a5() {
return \RectorPrefix20220224\composerRequirea574e7deb357bbdaea33e9951531c2a5(...func_get_args());
}
}
if (!function_exists('scanPath')) {