Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3da5664

Browse filesBrowse files
committed
minor #12781 ListenerInterface deprecated since Symfony 4.3 (JohnyProkie)
This PR was merged into the 4.3 branch. Discussion ---------- ListenerInterface deprecated since Symfony 4.3 Symfony\Component\Security\Http\Firewall deprecation comment: @deprecated since Symfony 4.3, turn listeners into callables instead Targeting 4.3 branch as per @OskarStark comment in original PR #12780 (comment) Commits ------- 6784ec4 ListenerInterface deprecated since Symfony 4.3
2 parents 777c946 + 6784ec4 commit 3da5664
Copy full SHA for 3da5664

File tree

Expand file treeCollapse file tree

1 file changed

+3
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-5
lines changed

‎security/custom_authentication_provider.rst

Copy file name to clipboardExpand all lines: security/custom_authentication_provider.rst
+3-5Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ The Listener
9797

9898
Next, you need a listener to listen on the firewall. The listener
9999
is responsible for fielding requests to the firewall and calling the authentication
100-
provider. A listener must be an instance of
101-
:class:`Symfony\\Component\\Security\\Http\\Firewall\\ListenerInterface`.
100+
provider. Listener is a callable, so you have to implement __invoke() method.
102101
A security listener should handle the
103102
:class:`Symfony\\Component\\HttpKernel\\Event\\RequestEvent` event, and
104103
set an authenticated token in the token storage if successful::
@@ -112,9 +111,8 @@ set an authenticated token in the token storage if successful::
112111
use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface;
113112
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
114113
use Symfony\Component\Security\Core\Exception\AuthenticationException;
115-
use Symfony\Component\Security\Http\Firewall\ListenerInterface;
116114

117-
class WsseListener implements ListenerInterface
115+
class WsseListener
118116
{
119117
protected $tokenStorage;
120118
protected $authenticationManager;
@@ -125,7 +123,7 @@ set an authenticated token in the token storage if successful::
125123
$this->authenticationManager = $authenticationManager;
126124
}
127125

128-
public function handle(RequestEvent $event)
126+
public function __invoke(RequestEvent $event)
129127
{
130128
$request = $event->getRequest();
131129

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.