8000 Update LogoutUrlGenerator exception messages · symfony/symfony@a0eb08f · GitHub
[go: up one dir, main page]

Skip to content

Commit a0eb08f

Browse files
committed
Update LogoutUrlGenerator exception messages
1 parent c21b25b commit a0eb08f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ private function getListener(?string $key): array
152152
}
153153

154154
if (null === $this->currentFirewallName) {
155-
throw new \InvalidArgumentException('Unable to find the current firewall LogoutListener, please make sure request is behind a firewall.');
155+
throw new \InvalidArgumentException('This request is not behind a firewall, please pass the firewall name manually to generate a logout URL.');
156156
}
157157

158-
throw new \InvalidArgumentException('Unable to find the current firewall LogoutListener, please provide the provider key manually.');
158+
throw new \InvalidArgumentException('Unable to find logout in the current firewall, please pass the firewall name manually to generate a logout URL.');
159159
}
160160
}

src/Symfony/Component/Security/Http/Tests/Logout/LogoutUrlGeneratorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function testGuessFromTokenWithoutFirewallNameFallbacksToCurrentFirewall(
9191
public function testUnableToGuessWithoutCurrentFirewallThrowsException()
9292
{
9393
$this->expectException(\InvalidArgumentException::class);
94-
$this->expectExceptionMessage('Unable to find the current firewall LogoutListener, please make sure request is behind a firewall.');
94+
$this->expectExceptionMessage('This request is not behind a firewall, please pass the firewall name manually to generate a logout URL.');
9595
$this->generator->registerListener('secured_area', '/logout', null, null);
9696

9797
$this->generator->getLogoutPath();
@@ -100,7 +100,7 @@ public function testUnableToGuessWithoutCurrentFirewallThrowsException()
100100
public function testUnableToGuessWithCurrentFirewallThrowsException()
101101
{
102102
$this->expectException(\InvalidArgumentException::class);
103-
$this->expectExceptionMessage('Unable to find the current firewall LogoutListener, please provide the provider key manually.');
103+
$this->expectExceptionMessage('Unable to find logout in the current firewall, please pass the firewall name manually to generate a logout URL.');
104104
$this->generator->registerListener('secured_area', '/logout', null, null);
105105
$this->generator->setCurrentFirewall('admin');
106106

0 commit comments

Comments
 (0)
0