diff --git a/packages/PostRector/Collector/UseNodesToAddCollector.php b/packages/PostRector/Collector/UseNodesToAddCollector.php index 31451bfc725..919bc400768 100644 --- a/packages/PostRector/Collector/UseNodesToAddCollector.php +++ b/packages/PostRector/Collector/UseNodesToAddCollector.php @@ -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; } } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 913c99ab559..22a5e65d4b6 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -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 */ diff --git a/vendor/autoload.php b/vendor/autoload.php index ba541a7182e..2c5c7ac11a1 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) { require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit513343f8f36365e3b1799607bf5db06d::getLoader(); +return ComposerAutoloaderInita48de870a8db8cad0632f36136f8d79f::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 1fdf57a0f0b..3f2e615694e 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -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; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 16cbd503cb0..6992703a5cc 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -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); }