File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
src/Symfony/Component/Security/Http/Tests/Firewall Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -546,7 +546,7 @@ public function supportsClass($class): bool
546
546
}
547
547
}
548
548
549
- class CustomToken implements TokenInterface
549
+ abstract class BaseCustomToken implements TokenInterface
550
550
{
551
551
private $ user ;
552
552
private $ roles ;
@@ -638,11 +638,24 @@ public function hasAttribute(string $name): bool
638
638
return false ;
639
639
}
640
640
641
- public function getAttribute (string $ name )
641
+ public function setAttribute (string $ name, $ value )
642
642
{
643
643
}
644
+ }
644
645
645
- public function setAttribute (string $ name , $ value )
646
+ if (\PHP_VERSION_ID >= 80000 ) {
647
+ class CustomToken extends BaseCustomToken
646
648
{
649
+ public function getAttribute (string $ name ): mixed
650
+ {
651
+ return null ;
652
+ }
653
+ }
654
+ } else {
655
+ class CustomToken extends BaseCustomToken
656
+ {
657
+ public function getAttribute (string $ name )
658
+ {
659
+ }
647
660
}
648
661
}
You can’t perform that action at this time.
0 commit comments