Skip to content

Commit c581b77

Browse files
committed
Updated Rector to commit 9ddef0001c3b7251f80e0c06d6ef0d35363a7cd4
rectorphp/rector-src@9ddef00 [Php80] Allow subnamespace from use statements support on AnnotationToAttributeRector (#5287)
1 parent 9fde5b0 commit c581b77

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

rules/CodingStyle/NodeAnalyzer/UseImportNameMatcher.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ private function resolveName(string $prefix, string $tag, UseUse $useUse) : stri
7171
throw new ShouldNotHappenException();
7272
}
7373
if (!$originalUseUseNode->alias instanceof Identifier) {
74+
$lastName = $originalUseUseNode->name->getLast();
75+
if (\strncmp($tag, $lastName . '\\', \strlen($lastName . '\\')) === 0) {
76+
$tagName = Strings::after($tag, '\\');
77+
return $prefix . $originalUseUseNode->name->toString() . '\\' . $tagName;
78+
}
7479
return $prefix . $originalUseUseNode->name->toString();
7580
}
7681
$unaliasedShortClass = Strings::substring($tag, \strlen($originalUseUseNode->alias->toString()));

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = '8b7829f77f2393d41ff71a2e0f0504835e22bba2';
22+
public const PACKAGE_VERSION = '9ddef0001c3b7251f80e0c06d6ef0d35363a7cd4';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2023-11-25 17:49:41';
27+
public const RELEASE_DATE = '2023-11-25 22:14:15';
2828
/**
2929
* @var int
3030
*/

0 commit comments

Comments
 (0)