Skip to content

Commit ac5c825

Browse files
committed
Deprecate injecting SecurityContextInterface into OAuthListener
1 parent f27384d commit ac5c825

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Security/Firewall/OAuthListener.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ public function __construct($securityContext, AuthenticationManagerInterface $au
5454
if (!$securityContext instanceof TokenStorageInterface && !$securityContext instanceof SecurityContextInterface) {
5555
throw new \InvalidArgumentException('Wrong type for OAuthListener, it has to implement TokenStorageInterface or SecurityContextInterface');
5656
}
57+
if ($securityContext instanceof SecurityContextInterface) {
58+
@trigger_error(sprintf('Injecting SecurityContextInterface into %1$s::__construct is deprecated since 1.6 and will be removed in 2.0.', __CLASS__), E_USER_DEPRECATED);
59+
}
5760
$this->securityContext = $securityContext;
5861
$this->authenticationManager = $authenticationManager;
5962
$this->serverService = $serverService;

0 commit comments

Comments
 (0)