-
-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Php80] Handle single quoted is_granted on AnnotationToAttributeRector (
#2842) Co-authored-by: Ghislain <ghislain@gambling-affiliation.com> Co-authored-by: GitHub Action <action@github.com>
- Loading branch information
1 parent
7215c28
commit 21695e7
Showing
4 changed files
with
90 additions
and
1 deletion.
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
33 changes: 33 additions & 0 deletions
33
.../Php80/Rector/Class_/AnnotationToAttributeRector/Fixture/Symfony/symfony_security.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,33 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Fixture\Symfony; | ||
|
||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; | ||
|
||
final class SymfonySecurity | ||
{ | ||
/** | ||
* @Security("is_granted(constant('\\Rector\\Tests\\Php80\\Rector\\Class_\\AnnotationToAttributeRector\\Source\\ConstantReference::FIRST_NAME'))") | ||
*/ | ||
public function action() | ||
{ | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Fixture\Symfony; | ||
|
||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; | ||
|
||
final class SymfonySecurity | ||
{ | ||
#[Security('is_granted(constant(\'\\\Rector\\\Tests\\\Php80\\\Rector\\\Class_\\\AnnotationToAttributeRector\\\Source\\\ConstantReference::FIRST_NAME\'))')] | ||
public function action() | ||
{ | ||
} | ||
} | ||
|
||
?> |
33 changes: 33 additions & 0 deletions
33
...Php80/Rector/Class_/AnnotationToAttributeRector/Fixture/Symfony/symfony_security2.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,33 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Fixture\Symfony; | ||
|
||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; | ||
|
||
final class SymfonySecurity2 | ||
{ | ||
/** | ||
* @Security("is_granted('ROLE_ADMIN') and is_granted('ROLE_FRIENDLY_USER')") | ||
*/ | ||
public function action() | ||
{ | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Fixture\Symfony; | ||
|
||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; | ||
|
||
final class SymfonySecurity2 | ||
{ | ||
#[Security("is_granted('ROLE_ADMIN') and is_granted('ROLE_FRIENDLY_USER')")] | ||
public function action() | ||
{ | ||
} | ||
} | ||
|
||
?> |
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