Updated Rector to commit bcc44fb1de64537d2249c2960ffc1a359fb31b41

bcc44fb1de Allow class vs function names on imports (#3404)
This commit is contained in:
Tomas Votruba 2023-02-23 10:33:44 +00:00
parent baee5d9d4a
commit 34705bb179
5 changed files with 15 additions and 28 deletions

View File

@ -94,36 +94,23 @@ final class PhpFileProcessor implements FileProcessorInterface
$systemErrorsAndFileDiffs[Bridge::SYSTEM_ERRORS] = $parsingSystemErrors;
return $systemErrorsAndFileDiffs;
}
$hasChangedOnPostRector = \false;
// 2. change nodes with Rectors
do {
$file->changeHasChanged(\false);
$this->fileProcessor->refactor($file, $configuration);
$fileNewStmts = $file->getNewStmts();
// 3. apply post rectors
$filePostRectorNewStmts = $this->postFileProcessor->traverse($fileNewStmts);
$newStmts = $this->postFileProcessor->traverse($file->getNewStmts());
// this is needed for new tokens added in "afterTraverse()"
$file->changeNewStmts($filePostRectorNewStmts);
if ($file->getRectorWithLineChanges() === [] && $fileNewStmts !== $filePostRectorNewStmts) {
$hasChangedOnPostRector = \true;
}
$file->changeNewStmts($newStmts);
// 4. print to file or string
// important to detect if file has changed
$this->printFile($file, $configuration);
} while ($file->hasChanged());
// return early on no diff
// return json here
$fileDiff = $file->getFileDiff();
if (!$fileDiff instanceof FileDiff) {
return $systemErrorsAndFileDiffs;
}
// No Line change and no PostRector change? return early
if ($file->getRectorWithLineChanges() === [] && !$hasChangedOnPostRector) {
return $systemErrorsAndFileDiffs;
}
// return early on diff is empty
if ($fileDiff->getDiff() === '') {
return $systemErrorsAndFileDiffs;
}
$systemErrorsAndFileDiffs[Bridge::FILE_DIFFS] = [$fileDiff];
return $systemErrorsAndFileDiffs;
}

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '48e97cb0e710d6b7d704d31a6e3c4320486e1ed4';
public const PACKAGE_VERSION = 'bcc44fb1de64537d2249c2960ffc1a359fb31b41';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-02-23 17:27:19';
public const RELEASE_DATE = '2023-02-23 10:27:05';
/**
* @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 ComposerAutoloaderInitaad712e8abc73da9ea9e94ef09ebace2::getLoader();
return ComposerAutoloaderInit5d603278d918fd9a51069cdc40b04ec3::getLoader();

View File

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