Skip to content

Commit

Permalink
[Messenger][Security/Core] Remove legacy class aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Mar 31, 2022
1 parent 95e9e9c commit 6bac15f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
4 changes: 0 additions & 4 deletions Authorization/TraceableAccessDecisionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,3 @@ public function getDecisionLog(): array
return $this->decisionLog;
}
}

if (!class_exists(DebugAccessDecisionManager::class, false)) {
class_alias(TraceableAccessDecisionManager::class, DebugAccessDecisionManager::class);
}
4 changes: 0 additions & 4 deletions Exception/UserNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,3 @@ public function __unserialize(array $data): void
parent::__unserialize($parentData);
}
}

if (!class_exists(UsernameNotFoundException::class, false)) {
class_alias(UserNotFoundException::class, UsernameNotFoundException::class);
}
8 changes: 0 additions & 8 deletions Tests/Authorization/TraceableAccessDecisionManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\AccessDecisionManager;
use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface;
use Symfony\Component\Security\Core\Authorization\DebugAccessDecisionManager;
use Symfony\Component\Security\Core\Authorization\TraceableAccessDecisionManager;
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;

Expand Down Expand Up @@ -171,13 +170,6 @@ public function provideObjectsAndLogs(): \Generator
];
}

public function testDebugAccessDecisionManagerAliasExistsForBC()
{
$adm = new TraceableAccessDecisionManager(new AccessDecisionManager());

$this->assertInstanceOf(DebugAccessDecisionManager::class, $adm, 'For BC, TraceableAccessDecisionManager must be an instance of DebugAccessDecisionManager');
}

/**
* Tests decision log returned when a voter call decide method of AccessDecisionManager.
*/
Expand Down

0 comments on commit 6bac15f

Please sign in to comment.