File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
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
546546 }
547547}
548548
549- class CustomToken implements TokenInterface
549+ abstract class BaseCustomToken implements TokenInterface
550550{
551551 private $ user ;
552552 private $ roles ;
@@ -638,11 +638,24 @@ public function hasAttribute(string $name): bool
638638 return false ;
639639 }
640640
641- public function getAttribute (string $ name )
641+ public function setAttribute (string $ name, $ value )
642642 {
643643 }
644+ }
644645
645- public function setAttribute (string $ name , $ value )
646+ if (\PHP_VERSION_ID >= 80000 ) {
647+ class CustomToken extends BaseCustomToken
646648 {
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+ }
647660 }
648661}
You can’t perform that action at this time.
0 commit comments