From 99b1eff64508238a1d66d5f534328df0cd8aa40d Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Thu, 5 Sep 2024 23:45:38 +0000 Subject: [PATCH] Updated Rector to commit 4a94d2e5049deffdfe4b5ce2597845ad1b4a0016 https://github.com/rectorphp/rector-src/commit/4a94d2e5049deffdfe4b5ce2597845ad1b4a0016 [PostRector] Allow remove unused use on conflict short name aliased on UnusedmportRemovingPostRector (#6292) --- src/Application/VersionResolver.php | 4 ++-- src/PostRector/Rector/UnusedImportRemovingPostRector.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 858ec8d002a..62b72fe5032 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 = 'cb96062f3cd5891fd89b419eebdd762061e82f85'; + public const PACKAGE_VERSION = '4a94d2e5049deffdfe4b5ce2597845ad1b4a0016'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-09-05 22:08:54'; + public const RELEASE_DATE = '2024-09-06 06:43:14'; /** * @var int */ diff --git a/src/PostRector/Rector/UnusedImportRemovingPostRector.php b/src/PostRector/Rector/UnusedImportRemovingPostRector.php index 475c216f2b7..4e527dca152 100644 --- a/src/PostRector/Rector/UnusedImportRemovingPostRector.php +++ b/src/PostRector/Rector/UnusedImportRemovingPostRector.php @@ -148,7 +148,7 @@ private function resolveAliasName(UseUse $useUse) : ?string */ private function isUseImportUsed(UseUse $useUse, array $names, ?Name $namespaceName) : bool { - $comparedName = $useUse->name->toString(); + $comparedName = $useUse->alias instanceof Identifier ? $useUse->alias->toString() : $useUse->name->toString(); if (\in_array($comparedName, $names, \true)) { return \true; }