Skip to content

Commit 2da9a7d

Browse files
committed
minor #60882 [Security] Document FirewallListenerInterface as a firewall listener type (MatTheCat)
This PR was merged into the 6.4 branch. Discussion ---------- [Security] Document `FirewallListenerInterface` as a firewall listener type | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Issues | N/A | License | MIT This PR updates PHPDocs regarding firewall listeners, since implementations of `FirewallListenerInterface` aren’t necessarily callables. Commits ------- 2455121 [Security] Document `FirewallListenerInterface` as a firewall listener type
2 parents 6b58568 + 2455121 commit 2da9a7d

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/Symfony/Bundle/SecurityBundle/Security/FirewallContext.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Bundle\SecurityBundle\Security;
1313

1414
use Symfony\Component\Security\Http\Firewall\ExceptionListener;
15+
use Symfony\Component\Security\Http\Firewall\FirewallListenerInterface;
1516
use Symfony\Component\Security\Http\Firewall\LogoutListener;
1617

1718
/**
@@ -28,7 +29,7 @@ class FirewallContext
2829
private ?FirewallConfig $config;
2930

3031
/**
31-
* @param iterable<mixed, callable> $listeners
32+
* @param iterable<mixed, callable|FirewallListenerInterface> $listeners
3233
*/
3334
public function __construct(iterable $listeners, ?ExceptionListener $exceptionListener = null, ?LogoutListener $logoutListener = null, ?FirewallConfig $config = null)
3435
{
@@ -47,7 +48,7 @@ public function getConfig()
4748
}
4849

4950
/**
50-
* @return iterable<mixed, callable>
51+
* @return iterable<mixed, callable|FirewallListenerInterface>
5152
*/
5253
public function getListeners(): iterable
5354
{

src/Symfony/Component/Security/Http/FirewallMap.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Symfony\Component\HttpFoundation\Request;
1515
use Symfony\Component\HttpFoundation\RequestMatcherInterface;
1616
use Symfony\Component\Security\Http\Firewall\ExceptionListener;
17+
use Symfony\Component\Security\Http\Firewall\FirewallListenerInterface;
1718
use Symfony\Component\Security\Http\Firewall\LogoutListener;
1819

1920
/**
@@ -25,12 +26,12 @@
2526
class FirewallMap implements FirewallMapInterface
2627
{
2728
/**
28-
* @var list<array{RequestMatcherInterface, list<callable>, ExceptionListener|null, LogoutListener|null}>
29+
* @var list<array{RequestMatcherInterface, list<callable|FirewallListenerInterface>, ExceptionListener|null, LogoutListener|null}>
2930
*/
3031
private array $map = [];
3132

3233
/**
33-
* @param list<callable> $listeners
34+
* @param list<callable|FirewallListenerInterface> $listeners
3435
*
3536
* @return void
3637
*/

src/Symfony/Component/Security/Http/FirewallMapInterface.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Symfony\Component\HttpFoundation\Request;
1515
use Symfony\Component\Security\Http\Firewall\ExceptionListener;
16+
use Symfony\Component\Security\Http\Firewall\FirewallListenerInterface;
1617
use Symfony\Component\Security\Http\Firewall\LogoutListener;
1718

1819
/**
@@ -35,7 +36,7 @@ interface FirewallMapInterface
3536
* If there is no logout listener, the third element of the outer array
3637
* must be null.
3738
*
38-
* @return array{iterable<mixed, callable>, ExceptionListener, LogoutListener}
39+
* @return array{iterable<mixed, callable|FirewallListenerInterface>, ExceptionListener, LogoutListener}
3940
*/
4041
public function getListeners(Request $request);
4142
}

0 commit comments

Comments
 (0)