Skip to content

Commit 4e7de10

Browse files
committed
Merge branch '5.4' into 6.3
* 5.4: Make FormPerformanceTestCase compatible with PHPUnit 10 [Security] Fix resetting traceable listeners [Validator] Add missing italian translations [Notifier] Tweak an error message Change incorrect message, when the sender in the global envelope or the from header of asEmailMessage() is not defined. Bump Symfony version to 5.4.30 Update VERSION for 5.4.29 Update CONTRIBUTORS for 5.4.29 Update CHANGELOG for 5.4.29
2 parents 2df460e + bfc644c commit 4e7de10

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

Debug/TraceableFirewallListener.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@
1717
use Symfony\Component\HttpKernel\Event\RequestEvent;
1818
use Symfony\Component\Security\Http\Authenticator\Debug\TraceableAuthenticatorManagerListener;
1919
use Symfony\Component\Security\Http\Firewall\FirewallListenerInterface;
20+
use Symfony\Contracts\Service\ResetInterface;
2021

2122
/**
2223
* Firewall collecting called security listeners and authenticators.
2324
*
2425
* @author Robin Chalas <[email protected]>
2526
*/
26-
final class TraceableFirewallListener extends FirewallListener
27+
final class TraceableFirewallListener extends FirewallListener implements ResetInterface
2728
{
2829
private array $wrappedListeners = [];
2930
private array $authenticatorsInfo = [];
@@ -41,6 +42,12 @@ public function getAuthenticatorsInfo(): array
4142
return $this->authenticatorsInfo;
4243
}
4344

45+
public function reset(): void
46+
{
47+
$this->wrappedListeners = [];
48+
$this->authenticatorsInfo = [];
49+
}
50+
4451
protected function callListeners(RequestEvent $event, iterable $listeners): void
4552
{
4653
$wrappedListeners = [];

DependencyInjection/SecurityExtension.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,7 @@ private function createFirewall(ContainerBuilder $container, string $id, array $
536536
->register('debug.security.firewall.authenticator.'.$id, TraceableAuthenticatorManagerListener::class)
537537
->setDecoratedService('security.firewall.authenticator.'.$id)
538538
->setArguments([new Reference('debug.security.firewall.authenticator.'.$id.'.inner')])
539+
->addTag('kernel.reset', ['method' => 'reset'])
539540
;
540541
}
541542

Resources/config/security_debug.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
service('security.logout_url_generator'),
3737
])
3838
->tag('kernel.event_subscriber')
39+
->tag('kernel.reset', ['method' => 'reset'])
3940
->alias('security.firewall', 'debug.security.firewall')
4041
;
4142
};

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"symfony/password-hasher": "^5.4|^6.0",
3030
"symfony/security-core": "^6.2",
3131
"symfony/security-csrf": "^5.4|^6.0",
32-
"symfony/security-http": "^6.3.4"
32+
"symfony/security-http": "^6.3.4",
33+
"symfony/service-contracts": "^1.10|^2|^3"
3334
},
3435
"require-dev": {
3536
"doctrine/annotations": "^1.10.4|^2",

0 commit comments

Comments
 (0)