-
-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AutoImport] Handle inner with sub namespace on auto import (#6679)
* [AutoImport] Handle inner with sub namespace on auto import * more fixtures * add @see for future reference for sub sub * Fix * verify short name * [ci-review] Rector Rectify * verify short name * verify short name * [ci-review] Rector Rectify * future note * future note * more fixture --------- Co-authored-by: GitHub Action <actions@github.com>
- Loading branch information
1 parent
71534e3
commit 0c36822
Showing
4 changed files
with
76 additions
and
6 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
29 changes: 29 additions & 0 deletions
29
tests/Issues/AutoImport/Fixture/inner_with_subnamespace.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 helpers; | ||
|
||
/** | ||
* @see https://3v4l.org/WMUjV0 | ||
* it read with "helpers" as prefix: helpers\Sub\VarDumper | ||
*/ | ||
class InnerWithSubnamespace extends Sub\VarDumper | ||
{ | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace helpers; | ||
|
||
use helpers\Sub\VarDumper; | ||
|
||
/** | ||
* @see https://3v4l.org/WMUjV0 | ||
* it read with "helpers" as prefix: helpers\Sub\VarDumper | ||
*/ | ||
class InnerWithSubnamespace extends VarDumper | ||
{ | ||
} | ||
|
||
?> |
29 changes: 29 additions & 0 deletions
29
tests/Issues/AutoImport/Fixture/inner_with_subnamespace2.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 helpers; | ||
|
||
/** | ||
* @see https://3v4l.org/PsIsB | ||
* it read as double "helpers" as sub sub: helpers\helpers\Sub\VarDumper | ||
*/ | ||
class InnerWithSubnamespace extends helpers\Sub\VarDumper | ||
{ | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace helpers; | ||
|
||
use helpers\helpers\Sub\VarDumper; | ||
|
||
/** | ||
* @see https://3v4l.org/PsIsB | ||
* it read as double "helpers" as sub sub: helpers\helpers\Sub\VarDumper | ||
*/ | ||
class InnerWithSubnamespace extends VarDumper | ||
{ | ||
} | ||
|
||
?> |
13 changes: 13 additions & 0 deletions
13
tests/Issues/AutoImport/Fixture/skip_direct_inner_with_subnamespace.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,13 @@ | ||
<?php | ||
|
||
namespace helpers; | ||
|
||
/** | ||
* @see https://3v4l.org/3ccde | ||
* it read with "helpers" as prefix with direct classname: helpers\VarDumper | ||
* | ||
* without needs of import, as directly in the same namespace | ||
*/ | ||
class SkipDirectInnerWithSubnamespace extends VarDumper | ||
{ | ||
} |