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 ec51f29

Browse filesBrowse files
committed
bug #43830 [Security][SecurityBundle] Backport 6.0 compat fixes (derrabus)
This PR was merged into the 5.4 branch. Discussion ---------- [Security][SecurityBundle] Backport 6.0 compat fixes | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Backports from #43829 | License | MIT | Doc PR | N/A Commits ------- f7d4a14 [Security] Backport 6.0 compat fixes
2 parents 303f0c9 + f7d4a14 commit ec51f29
Copy full SHA for ec51f29

File tree

2 files changed

+5
-8
lines changed
Filter options

2 files changed

+5
-8
lines changed

‎src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Bundle\SecurityBundle\DataCollector\SecurityDataCollector;
1616
use Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener;
17+
use Symfony\Bundle\SecurityBundle\DependencyInjection\MainConfiguration;
1718
use Symfony\Bundle\SecurityBundle\Security\FirewallConfig;
1819
use Symfony\Bundle\SecurityBundle\Security\FirewallMap;
1920
use Symfony\Component\EventDispatcher\EventDispatcher;
@@ -24,7 +25,6 @@
2425
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
2526
use Symfony\Component\Security\Core\Authentication\Token\SwitchUserToken;
2627
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
27-
use Symfony\Component\Security\Core\Authorization\AccessDecisionManager;
2828
use Symfony\Component\Security\Core\Authorization\TraceableAccessDecisionManager;
2929
use Symfony\Component\Security\Core\Authorization\Voter\TraceableVoter;
3030
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
@@ -231,7 +231,7 @@ public function providerCollectDecisionLog(): \Generator
231231
$decoratedVoter1 = new TraceableVoter($voter1, $eventDispatcher);
232232

233233
yield [
234-
AccessDecisionManager::STRATEGY_AFFIRMATIVE,
234+
MainConfiguration::STRATEGY_AFFIRMATIVE,
235235
[[
236236
'attributes' => ['view'],
237237
'object' => new \stdClass(),
@@ -255,7 +255,7 @@ public function providerCollectDecisionLog(): \Generator
255255
];
256256

257257
yield [
258-
AccessDecisionManager::STRATEGY_UNANIMOUS,
258+
MainConfiguration::STRATEGY_UNANIMOUS,
259259
[
260260
[
261261
'attributes' => ['view', 'edit'],

‎src/Symfony/Component/Security/Core/Tests/Authorization/TraceableAccessDecisionManagerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Authorization/TraceableAccessDecisionManagerTest.php
+2-5Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1616
use Symfony\Component\Security\Core\Authorization\AccessDecisionManager;
17+
use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface;
1718
use Symfony\Component\Security\Core\Authorization\DebugAccessDecisionManager;
1819
use Symfony\Component\Security\Core\Authorization\TraceableAccessDecisionManager;
1920
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
@@ -26,11 +27,7 @@ class TraceableAccessDecisionManagerTest extends TestCase
2627
public function testDecideLog(array $expectedLog, array $attributes, $object, array $voterVotes, bool $result)
2728
{
2829
$token = $this->createMock(TokenInterface::class);
29-
30-
$admMock = $this
31-
->getMockBuilder(AccessDecisionManager::class)
32-
->setMethods(['decide'])
33-
->getMock();
30+
$admMock = $this->createMock(AccessDecisionManagerInterface::class);
3431

3532
$adm = new TraceableAccessDecisionManager($admMock);
3633

0 commit comments

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