mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-31 12:42:05 +01:00
Updated Rector to commit 2d1b9ab461c35e326b2ad78bd2758c5c3a69c9cc
2d1b9ab461
[Renaming] FQN-ize namespaced import no namespace -> namespaced name on RenameClassRector (#5256)
This commit is contained in:
parent
5aeafef0ed
commit
b89547bfbe
@ -95,6 +95,15 @@ final class UseAddingPostRector extends \Rector\PostRector\Rector\AbstractPostRe
|
||||
$this->useImportsAdder->addImportsToNamespace($namespace, $useImportTypes, $constantUseImportTypes, $functionUseImportTypes);
|
||||
return $nodes;
|
||||
}
|
||||
// just renamed no-namepaced class to namespaced class
|
||||
$namespaces = \array_filter($nodes, static function (Stmt $stmt) : bool {
|
||||
return $stmt instanceof Namespace_;
|
||||
});
|
||||
if ($namespaces !== []) {
|
||||
// then add, to prevent adding + removing false positive of same short use
|
||||
$this->useImportsAdder->addImportsToNamespace(\current($namespaces), $useImportTypes, $constantUseImportTypes, $functionUseImportTypes);
|
||||
return $nodes;
|
||||
}
|
||||
// B. no namespace? add in the top
|
||||
$useImportTypes = $this->filterOutNonNamespacedNames($useImportTypes);
|
||||
// then add, to prevent adding + removing false positive of same short use
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '0.18.9';
|
||||
public const PACKAGE_VERSION = '2d1b9ab461c35e326b2ad78bd2758c5c3a69c9cc';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-11-17 00:34:24';
|
||||
public const RELEASE_DATE = '2023-11-17 02:36:50';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user