-
-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Renaming] Handle Rename before AttributeGroup on RenameClassRector (#…
…1481) * testWithRouteAttribute test case * revert * Add unit test * fix namespace/imports * Add namespace * move fixture and config * debug * Closes #1479 Fixes rectorphp/rector#6861 Co-authored-by: Phil E. Taylor <phil@phil-taylor.com>
- Loading branch information
1 parent
528d6dd
commit a7fe982
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
rules-tests/Renaming/Rector/Name/RenameClassRector/Fixture/rename_before_attribute.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,37 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Renaming\Rector\Name\RenameClassRector\Fixture; | ||
|
||
use Doctrine\DBAL\DBALException; | ||
|
||
class RenameBeforeAttribute | ||
{ | ||
/** | ||
* @throws DBALException | ||
*/ | ||
#[Route(path: '/top/', name: 'top')] | ||
public function testWithRouteAttribute(){ | ||
// something throws the exception deep down here.... | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\Renaming\Rector\Name\RenameClassRector\Fixture; | ||
|
||
use Doctrine\DBAL\DBALException; | ||
|
||
class RenameBeforeAttribute | ||
{ | ||
/** | ||
* @throws \Doctrine\DBAL\Exception | ||
*/ | ||
#[Route(path: '/top/', name: 'top')] | ||
public function testWithRouteAttribute(){ | ||
// something throws the exception deep down here.... | ||
} | ||
} | ||
|
||
?> |
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