Skip to content

Commit ee1763b

Browse files
committed
Use a better exception when using make:auth with a form
1 parent 09fc38c commit ee1763b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Security/SecurityControllerBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function addLogoutMethod(ClassSourceManipulator $manipulator)
7171
$manipulator->addUseStatementIfNecessary(Route::class);
7272
$manipulator->addMethodBody($logoutMethodBuilder, <<<'CODE'
7373
<?php
74-
throw new \Exception('This method can be blank - it will be intercepted by the logout key on your firewall');
74+
throw new \LogicException('This method can be blank - it will be intercepted by the logout key on your firewall.');
7575
CODE
7676
);
7777
$manipulator->addMethodBuilder($logoutMethodBuilder);

tests/Security/fixtures/expected/SecurityController_login_logout.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ public function login(AuthenticationUtils $authenticationUtils): Response
3131
*/
3232
public function logout()
3333
{
34-
throw new \Exception('This method can be blank - it will be intercepted by the logout key on your firewall');
34+
throw new \LogicException('This method can be blank - it will be intercepted by the logout key on your firewall.');
3535
}
3636
}

0 commit comments

Comments
 (0)