Skip to content

Commit 912a75c

Browse files
committed
[Security] Fix resetting traceable listeners
1 parent 7815edb commit 912a75c

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Authenticator/Debug/TraceableAuthenticatorManagerListener.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@
1616
use Symfony\Component\Security\Http\Firewall\AbstractListener;
1717
use Symfony\Component\Security\Http\Firewall\AuthenticatorManagerListener;
1818
use Symfony\Component\VarDumper\Caster\ClassStub;
19+
use Symfony\Contracts\Service\ResetInterface;
1920

2021
/**
2122
* Decorates the AuthenticatorManagerListener to collect information about security authenticators.
2223
*
2324
* @author Robin Chalas <robin.chalas@gmail.com>
2425
*/
25-
final class TraceableAuthenticatorManagerListener extends AbstractListener
26+
final class TraceableAuthenticatorManagerListener extends AbstractListener implements ResetInterface
2627
{
2728
private $authenticationManagerListener;
2829
private $authenticatorsInfo = [];
@@ -78,4 +79,9 @@ public function getAuthenticatorsInfo(): array
7879
{
7980
return $this->authenticatorsInfo;
8081
}
82+
83+
public function reset(): void
84+
{
85+
$this->authenticatorsInfo = [];
86+
}
8187
}

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
"require": {
1919
"php": ">=7.2.5",
2020
"symfony/deprecation-contracts": "^2.1|^3",
21-
"symfony/security-core": "^5.4.19|~6.0.19|~6.1.11|^6.2.5",
2221
"symfony/http-foundation": "^5.3|^6.0",
2322
"symfony/http-kernel": "^5.3|^6.0",
2423
"symfony/polyfill-mbstring": "~1.0",
2524
"symfony/polyfill-php80": "^1.16",
26-
"symfony/property-access": "^4.4|^5.0|^6.0"
25+
"symfony/property-access": "^4.4|^5.0|^6.0",
26+
"symfony/security-core": "^5.4.19|~6.0.19|~6.1.11|^6.2.5",
27+
"symfony/service-contracts": "^1.10|^2|^3"
2728
},
2829
"require-dev": {
2930
"symfony/cache": "^4.4|^5.0|^6.0",

0 commit comments

Comments
 (0)