8000 added type-hint · symfony/symfony@ba71b68 · GitHub
[go: up one dir, main page]

Skip to content

Commit ba71b68

Browse files
committed
added type-hint
1 parent 91d01d8 commit ba71b68

20 files changed

+62
-161
lines changed

src/Symfony/Bridge/Twig/Extension/SecurityExtension.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bridge\Twig\Extension;
1313

1414
use Symfony\Component\Security\Acl\Voter\FieldVote;
15-
use Symfony\Component\Security\Core\SecurityContextInterface;
1615
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
1716

1817
/**
@@ -24,12 +23,7 @@ class SecurityExtension extends \Twig_Extension
2423
{
2524
private $securityChecker;
2625

27-
/**
28-
* @param SecurityContextInterface|AuthorizationCheckerInterface
29-
*
30-
* Passing a SecurityContextInterface as a first argument was deprecated in 2.7 and will be removed in 3.0
31-
*/
32-
public function __construct($securityChecker = null)
26+
public function __construct(AuthorizationCheckerInterface $securityChecker = null)
3327
{
3428
$this->securityChecker = $securityChecker;
3529
}

src/Symfony/Bridge/Twig/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
],
1818
"require": {
1919
"php": ">=5.3.3",
20-
"symfony/security-csrf": "~2.4|~3.0.0",
20+
"symfony/security-csrf": "~2.6|~3.0.0",
2121
"twig/twig": "~1.13,>=1.13.1"
2222
},
2323
"require-dev": {
@@ -29,7 +29,7 @@
2929
"symfony/templating": "~2.1|~3.0.0",
3030
"symfony/translation": "~2.2|~3.0.0",
3131
"symfony/yaml": "~2.0,>=2.0.5|~3.0.0",
32-
"symfony/security": "~2.4|~3.0.0",
32+
"symfony/security": "~2.6|~3.0.0",
3333
"symfony/stopwatch": "~2.2|~3.0.0",
3434
"symfony/console": "~2.4|~3.0.0",
3535
"symfony/var-dumper": "~2.6|~3.0.0",

src/Symfony/Bundle/SecurityBundle/Templating/Helper/SecurityHelper.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Symfony\Component\Security\Acl\Voter\FieldVote;
1515
use Symfony\Component\Templating\Helper\Helper;
16-
use Symfony\Component\Security\Core\SecurityContextInterface;
1716
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
1817

1918
/**
@@ -25,12 +24,7 @@ class SecurityHelper extends Helper
2524
{
2625
private $securityChecker;
2726

28-
/**
29-
* @param SecurityContextInterface|AuthorizationCheckerInterface
30-
*
31-
* Passing a SecurityContextInterface as a first argument was deprecated in 2.7 and will be removed in 3.0
32-
*/
33-
public function __construct($securityChecker = null)
27+
public function __construct(AuthorizationCheckerInterface $securityChecker = null)
3428
{
3529
$this->securityChecker = $securityChecker;
3630
}

src/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Security\Core\Validator\Constraints;
1313

1414
use Symfony\Component\Security\Core\User\UserInterface;
15-
use Symfony\Component\Security\Core\SecurityContextInterface;
1615
use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface;
1716
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
1817
use Symfony\Component\Validator\Constraint;
@@ -25,12 +24,7 @@ class UserPasswordValidator extends ConstraintValidator
2524
private $tokenStorage;
2625
private $encoderFactory;
2726

28-
/**
29-
* @param SecurityContextInterface|TokenStorageInterface
30-
*
31-
* Passing a SecurityContextInterface as a first argument was deprecated in 2.7 and will be removed in 3.0
32-
*/
33-
public function __construct($tokenStorage, EncoderFactoryInterface $encoderFactory)
27+
public function __construct(TokenStorageInterface $tokenStorage, EncoderFactoryInterface $encoderFactory)
3428
{
3529
$this->tokenStorage = $tokenStorage;
3630
$this->encoderFactory = $encoderFactory;

src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use Symfony\Component\Security\Http\Authentication\AuthenticationSuccessHandlerInterface;
1717
use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface;
1818
use Symfony\Component\Security\Core\Security;
19-
use Symfony\Component\Security\Core\SecurityContextInterface;
2019
use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface;
2120
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
2221
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
@@ -67,23 +66,21 @@ abstract class AbstractAuthenticationListener implements ListenerInterface
6766
/**
6867
* Constructor.
6968
*
70-
* @param SecurityContextInterface|TokenStorageInterface $tokenStorage A SecurityContext or a TokenStorageInterface instance
71-
* @param AuthenticationManagerInterface $authenticationManager An AuthenticationManagerInterface instance
72-
* @param SessionAuthenticationStrategyInterface $sessionStrategy
73-
* @param HttpUtils $httpUtils An HttpUtilsInterface instance
74-
* @param string $providerKey
75-
* @param AuthenticationSuccessHandlerInterface $successHandler
76-
* @param AuthenticationFailureHandlerInterface $failureHandler
77-
* @param array $options An array of options for the processing of a
78-
* successful, or failed authentication attempt
79-
* @param LoggerInterface $logger A LoggerInterface instance
80-
* @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance
69+
* @param TokenStorageInterface $tokenStorage A TokenStorageInterface instance
70+
* @param AuthenticationManagerInterface $authenticationManager An AuthenticationManagerInterface instance
71+
* @param SessionAuthenticationStrategyInterface $sessionStrategy
72+
* @param HttpUtils $httpUtils An HttpUtilsInterface instance
73+
* @param string $providerKey
74+
* @param AuthenticationSuccessHandlerInterface $successHandler
75+
* @param AuthenticationFailureHandlerInterface $failureHandler
76+
* @param array $options An array of options for the processing of a
77+
* successful, or failed authentication attempt
78+
* @param LoggerInterface $logger A LoggerInterface instance
79+
* @param EventDispatcherInterface $dispatcher An EventDispatcherInterface instance
8180
*
8281
* @throws \InvalidArgumentException
83-
*
84-
* Passing a SecurityContextInterface as a first argument was deprecated in 2.7 and will be removed in 3.0
8582
*/
86-
public function __construct($tokenStorage, AuthenticationManagerInterface $authenticationManager, SessionAuthenticationStrategyInterface $sessionStrategy, HttpUtils $httpUtils, $providerKey, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, array $options = array(), LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null)
83+
public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, SessionAuthenticationStrategyInterface $sessionStrategy, HttpUtils $httpUtils, $providerKey, AuthenticationSuccessHandlerInterface $successHandler, AuthenticationFailureHandlerInterface $failureHandler, array $options = array(), LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null)
8784
{
8885
if (empty($providerKey)) {
8986
throw new \InvalidArgumentException('$providerKey must not be empty.');

src/Symfony/Component/Security/Http/Firewall/AbstractPreAuthenticatedListener.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Security\Http\Firewall;
1313

14-
use Symfony\Component\Security\Core\SecurityContextInterface;
1514
use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface;
1615
use Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken;
1716
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
@@ -39,12 +38,7 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface
3938
private $providerKey;
4039
private $dispatcher;
4140

42-
/**
43-
* @param SecurityContextInterface|TokenStorageInterface
44-
*
45-
* Passing a SecurityContextInterface as a first argument was deprecated in 2.7 and will be removed in 3.0
46-
*/
47-
public function __construct($tokenStorage, AuthenticationManagerInterface $authenticationManager, $providerKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null)
41+
public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, $providerKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null)
4842
{
4943
$this->tokenStorage = $tokenStorage;
5044
$this->authenticationManager = $authenticationManager;

src/Symfony/Component/Security/Http/Firewall/AccessListener.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Security\Http\Firewall;
1313

14-
use Symfony\Component\Security\Core\SecurityContextInterface;
1514
use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface;
1615
use Symfony\Component\Security\Http\AccessMapInterface;
1716
use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface;
@@ -32,12 +31,7 @@ class AccessListener implements ListenerInterface
3231
private $map;
3332
private $authManager;
3433

35-
/**
36-
* @param SecurityContextInterface|TokenStorageInterface
37-
*
38-
* Passing a SecurityContextInterface as a first argument was deprecated in 2.7 and will be removed in 3.0
39-
*/
40-
public function __construct($tokenStorage, AccessDecisionManagerInterface $accessDecisionManager, AccessMapInterface $map, AuthenticationManagerInterface $authManager)
34+
public function __construct(TokenStorageInterface $tokenStorage, AccessDecisionManagerInterface $accessDecisionManager, AccessMapInterface $map, AuthenticationManagerInterface $authManager)
4135
{
4236
$this->tokenStorage = $tokenStorage;
4337
$this->accessDecisionManager = $accessDecisionManager;

src/Symfony/Component/Security/Http/Firewall/AnonymousAuthenticationListener.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface;
1515
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
1616
use Symfony\Component\Security\Core\Exception\AuthenticationException;
17-
use Symfony\Component\Security\Core\SecurityContextInterface;
1817
use Psr\Log\LoggerInterface;
1918
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
2019
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
@@ -32,12 +31,7 @@ class AnonymousAuthenticationListener implements ListenerInterface
3231
private $authenticationManager;
3332
private $logger;
3433

35-
/**
36-
* @param SecurityContextInterface|TokenStorageInterface
37-
*
38-
* Passing a SecurityContextInterface as a first argument was deprecated in 2.7 and will be removed in 3.0
39-
*/
40-
public function __construct($tokenStorage, $key, LoggerInterface $logger = null, AuthenticationManagerInterface $authenticationManager = null)
34+
public function __construct(TokenStorageInterface $tokenStorage, $key, LoggerInterface $logger = null, AuthenticationManagerInterface $authenticationManager = null)
4135
{
4236
$this->tokenStorage = $tokenStorage;
4337
$this->key = $key;

src/Symfony/Component/Security/Http/Firewall/BasicAuthenticationListener.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Security\Http\Firewall;
1313

14-
use Symfony\Component\Security\Core\SecurityContextInterface;
1514
use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface;
1615
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
1716
use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface;
@@ -34,12 +33,7 @@ class BasicAuthenticationListener implements ListenerInterface
3433
private $logger;
3534
private $ignoreFailure;
3635

37-
/**
38-
* @param SecurityContextInterface|TokenStorageInterface
39-
*
40-
* Passing a SecurityContextInterface as a first argument was deprecated in 2.7 and will be removed in 3.0
41-
*/
42-
public function __construct($tokenStorage, AuthenticationManagerInterface $authenticationManager, $providerKey, AuthenticationEntryPointInterface $authenticationEntryPoint, LoggerInterface $logger = null)
36+
public function __construct(TokenStorageInterface $tokenStorage, AuthenticationManagerInterface $authenticationManager, $providerKey, AuthenticationEntryPointInterface $authenticationEntryPoint, LoggerInterface $logger = null)
4337
{
4438
if (empty($providerKey)) {
4539
throw new \InvalidArgumentException('$providerKey must not be empty.');

src/Symfony/Component/Security/Http/Firewall/ContextListener.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
2121
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
2222
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
23-
use Symfony\Component\Security\Core\SecurityContextInterface;
2423
use Symfony\Component\Security\Core\User\UserInterface;
2524
use Symfony\Component\Security\Core\User\UserProviderInterface;
2625
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
@@ -40,12 +39,7 @@ class ContextListener implements ListenerInterface
4039
private $dispatcher;
4140
private $registered;
4241

43-
/**
44-
* @param SecurityContextInterface|TokenStorageInterface
45-
*
46-
* Passing a SecurityContextInterface as a first argument was deprecated in 2.7 and will be removed in 3.0
47-
*/
48-
public function __construct($tokenStorage, array $userProviders, $contextKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null)
42+
public function __construct(TokenStorageInterface $tokenStorage, array $userProviders, $contextKey, LoggerInterface $logger = null, EventDispatcherInterface $dispatcher = null)
4943
{
5044
if (empty($contextKey)) {
5145
throw new \InvalidArgumentException('$contextKey must not be empty.');

0 commit comments

Comments
 (0)
0