-
-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AutoImport][Renaming] Handle same last name no namespace just rename…
…d auto import (#5248) * [AutoImport][Renaming] Handle same last name no namespace just renamed auto import * udpate fixture * Fixed 🎉 * fix * add namespaced fixture * use in attrbiute * fix * fixed * fix * clean up * [ci-review] Rector Rectify --------- Co-authored-by: GitHub Action <actions@github.com>
- Loading branch information
1 parent
f0b8af8
commit 889372f
Showing
5 changed files
with
74 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
tests/Issues/AutoImport/Fixture/no_namespace_used_class_renamed.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
function NoNamespaceUsedClassRenamed( | ||
// fqcn | ||
\Some\Exception $e | ||
) | ||
{ | ||
// from root | ||
$obj = new Exception(); | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
function NoNamespaceUsedClassRenamed( | ||
// fqcn | ||
\Some\Target\Exception $e | ||
) | ||
{ | ||
// from root | ||
$obj = new Exception(); | ||
} | ||
|
||
?> |
29 changes: 29 additions & 0 deletions
29
tests/Issues/AutoImport/Fixture/with_namespace_used_class_renamed.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace App; | ||
|
||
function WithNamespaceUsedClassRenamed( | ||
// fqcn | ||
\Some\Exception $e | ||
) | ||
{ | ||
// from root namespace App | ||
$obj = new Exception(); | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace App; | ||
|
||
function WithNamespaceUsedClassRenamed( | ||
// fqcn | ||
\Some\Target\Exception $e | ||
) | ||
{ | ||
// from root namespace App | ||
$obj = new Exception(); | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters