Updated Rector to commit 37be2c2268a7251c4d422e7c6a607d8931459731

37be2c2268 [PostRector] strtolower() early on UseNodesToAddCollector (#4830)
This commit is contained in:
Tomas Votruba 2023-08-21 15:15:26 +00:00
parent 429b44fab4
commit 994dcc7c44
5 changed files with 18 additions and 17 deletions

View File

@ -97,9 +97,6 @@ final class UseNodesToAddCollector implements NodeCollectorInterface
{
$shortName = $fullyQualifiedObjectType->getShortName();
$filePath = $file->getFilePath();
if ($this->isShortClassImported($filePath, $shortName)) {
return \true;
}
$fileConstantUseImportTypes = $this->constantUseImportTypesInFilePath[$filePath] ?? [];
foreach ($fileConstantUseImportTypes as $fileConstantUseImportType) {
// don't compare strtolower for use const as insensitive is allowed, see https://3v4l.org/lteVa
@ -107,9 +104,13 @@ final class UseNodesToAddCollector implements NodeCollectorInterface
return \true;
}
}
$shortName = \strtolower($shortName);
if ($this->isShortClassImported($filePath, $shortName)) {
return \true;
}
$fileFunctionUseImportTypes = $this->functionUseImportTypesInFilePath[$filePath] ?? [];
foreach ($fileFunctionUseImportTypes as $fileFunctionUseImportType) {
if (\strtolower($fileFunctionUseImportType->getShortName()) === \strtolower($shortName)) {
if (\strtolower($fileFunctionUseImportType->getShortName()) === $shortName) {
return \true;
}
}
@ -163,7 +164,7 @@ final class UseNodesToAddCollector implements NodeCollectorInterface
{
$fileUseImports = $this->useImportTypesInFilePath[$filePath] ?? [];
foreach ($fileUseImports as $fileUseImport) {
if (\strtolower($fileUseImport->getShortName()) === \strtolower($shortName)) {
if (\strtolower($fileUseImport->getShortName()) === $shortName) {
return \true;
}
}

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'cdccb5199ddc160fb7945879cf1403f1c7289770';
public const PACKAGE_VERSION = '37be2c2268a7251c4d422e7c6a607d8931459731';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-08-21 15:05:00';
public const RELEASE_DATE = '2023-08-21 22:12:44';
/**
* @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 ComposerAutoloaderInit513343f8f36365e3b1799607bf5db06d::getLoader();
return ComposerAutoloaderInita48de870a8db8cad0632f36136f8d79f::getLoader();

View File

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