Updated Rector to commit ad7d9b12ea0fa8bba78be8d0348daa6ecffe3abe

ad7d9b12ea [DX] Always init $this->hasChanged on Rector rule to ensure the flag is reset on same call on different file (#4454)
This commit is contained in:
Tomas Votruba 2023-07-09 11:49:50 +00:00
parent 50857a197a
commit 994045415a
9 changed files with 17 additions and 12 deletions

View File

@ -66,6 +66,7 @@ CODE_SAMPLE
*/
public function refactor(Node $node) : ?String_
{
$this->hasChanged = \false;
if (StringUtils::isMatch($node->value, self::HAS_NON_PRINTABLE_CHARS)) {
return null;
}

View File

@ -96,6 +96,7 @@ CODE_SAMPLE
*/
public function refactor(Node $node) : ?Node
{
$this->hasChanged = \false;
$this->refactorClassProperties($node);
$hasPromotedPropertyChanged = $this->propertyPromotionRenamer->renamePropertyPromotion($node);
if ($this->hasChanged) {

View File

@ -90,6 +90,7 @@ CODE_SAMPLE
if ($node instanceof ClassMethod && $this->shouldSkipClassMethod($node)) {
return null;
}
$this->hasChanged = \false;
$phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node);
$this->refactorParamTypes($node, $phpDocInfo);
$hasChanged = $this->paramTagRemover->removeParamTagsIfUseless($phpDocInfo, $node);

View File

@ -46,6 +46,7 @@ final class RenamePropertyRector extends AbstractRector implements ConfigurableR
public function refactor(Node $node) : ?Node
{
if ($node instanceof ClassLike) {
$this->hasChanged = \false;
foreach ($this->renamedProperties as $renamedProperty) {
$this->renameProperty($node, $renamedProperty);
}

View File

@ -81,6 +81,7 @@ CODE_SAMPLE
*/
public function refactor(Node $node) : ?Node
{
$this->hasChanged = \false;
foreach ($node->getMethods() as $classMethod) {
if ($this->shouldSkip($node, $classMethod)) {
continue;

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '5ed67fb6cfd7bdb79ac993797123f25e78d61d11';
public const PACKAGE_VERSION = 'ad7d9b12ea0fa8bba78be8d0348daa6ecffe3abe';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-07-09 11:21:20';
public const RELEASE_DATE = '2023-07-09 18:45:47';
/**
* @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 ComposerAutoloaderInit254cae883b5130533f2a276e2c3139d3::getLoader();
return ComposerAutoloaderInit10fa666e877d46ee82134014fb8adb6b::getLoader();

View File

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