Skip to content

Commit f584372

Browse files
committed
add legacy block
1 parent 750be4f commit f584372

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Security/SecurityControllerBuilder.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public function addLoginMethod(ClassSourceManipulator $manipulator): void
3333
{
3434
$loginMethodBuilder = $manipulator->createMethodBuilder('login', 'Response', false);
3535

36+
// @legacy Refactor when annotations are no longer supported
3637
if ($this->phpCompatUtil->canUseAttributes()) {
3738
$loginMethodBuilder->addAttribute($manipulator->buildAttributeNode(Route::class, ['/login', 'name' => 'app_login']));
3839
} else {
@@ -85,8 +86,9 @@ public function addLoginMethod(ClassSourceManipulator $manipulator): void
8586

8687
public function addLogoutMethod(ClassSourceManipulator $manipulator): void
8788
{
88-
$logoutMethodBuilder = $manipulator->createMethodBuilder('logout', 'void', false, ['']);
89+
$logoutMethodBuilder = $manipulator->createMethodBuilder('logout', 'void', false);
8990

91+
// @legacy Refactor when annotations are no longer supported
9092
if ($this->phpCompatUtil->canUseAttributes()) {
9193
$logoutMethodBuilder->addAttribute($manipulator->buildAttributeNode(Route::class, ['/logout', 'name' => 'app_logout']));
9294
} else {

0 commit comments

Comments
 (0)