Skip to content

Commit ab4dfe2

Browse files
committed
feature symfony#26 Depend on AuthenticationTrustResolverInterface (scheb)
This PR was squashed before being merged into the 3.0-dev branch (closes symfony#26). Discussion ---------- Depend on AuthenticationTrustResolverInterface SecurityIdentityRetrievalStrategy should depend on AuthenticationTrustResolverInterface, otherwise it's not possible to use any alternative implementation. I'd also suggest to backport this at least to 2.8. Commits ------- 04e3414 Depend on AuthenticationTrustResolverInterface
2 parents 2a9b3ec + 04e3414 commit ab4dfe2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Domain/SecurityIdentityRetrievalStrategy.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
namespace Symfony\Component\Security\Acl\Domain;
1313

14+
use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface;
1415
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
1516
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1617
use Symfony\Component\Security\Acl\Model\SecurityIdentityRetrievalStrategyInterface;
17-
use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver;
1818
use Symfony\Component\Security\Core\Role\RoleHierarchyInterface;
1919
use Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter;
2020

@@ -31,10 +31,10 @@ class SecurityIdentityRetrievalStrategy implements SecurityIdentityRetrievalStra
3131
/**
3232
* Constructor.
3333
*
34-
* @param RoleHierarchyInterface $roleHierarchy
35-
* @param AuthenticationTrustResolver $authenticationTrustResolver
34+
* @param RoleHierarchyInterface $roleHierarchy
35+
* @param AuthenticationTrustResolverInterface $authenticationTrustResolver
3636
*/
37-
public function __construct(RoleHierarchyInterface $roleHierarchy, AuthenticationTrustResolver $authenticationTrustResolver)
37+
public function __construct(RoleHierarchyInterface $roleHierarchy, AuthenticationTrustResolverInterface $authenticationTrustResolver)
3838
{
3939
$this->roleHierarchy = $roleHierarchy;
4040
$this->authenticationTrustResolver = $authenticationTrustResolver;

Tests/Domain/SecurityIdentityRetrievalStrategyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ protected function getStrategy(array $roles = array(), $authenticationStatus = '
129129
->will($this->returnValue($roles))
130130
;
131131

132-
$trustResolver = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver', array(), array('', ''));
132+
$trustResolver = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolverInterface', array(), array('', ''));
133133

134134
$trustResolver
135135
->expects($this->at(0))

0 commit comments

Comments
 (0)