8000 bug #22664 [Security] Fix TraceableAccessDecisionManager / DebugAcces… · symfony/symfony@83114ad · GitHub
[go: up one dir, main page]

Skip to content

Commit 83114ad

Browse files
committed
bug #22664 [Security] Fix TraceableAccessDecisionManager / DebugAccessDecisionManager BC layer (ogizanagi)
This PR was merged into the 3.3-dev branch. Discussion ---------- [Security] Fix TraceableAccessDecisionManager / DebugAccessDecisionManager BC layer | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #22657 (comment) | License | MIT | Doc PR | N/A Same as #22657 for the renaming of `DebugAccessDecisionManager` into `TraceableAccessDecisionManager`. Indeed, I think we also require to redeclare the old `DebugAccessDecisionManager` for composer `classmap-authoritative` autoloading strategy & classmap dumper. AppVeyor failures unrelated. Edit: Re-thinking about it, it's probably not very common to dump the classmap and use the `classmap-authoritative` strategy when using those classes... That's to say: in debug mode/dev env. So it may be the reason why the class wasn't redeclared on contrary of `DefinitionDecorator`. Commits ------- 5b123b9 [Security] Fix TraceableAccessDecisionManager / DebugAccessDecisionManager BC layer
2 parents b33f1df + 5b123b9 commit 83114ad

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

src/Symfony/Component/Security/Core/Authorization/DebugAccessDecisionManager.php

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,26 @@
1111

1212
namespace Symfony\Component\Security\Core\Authorization;
1313

14-
/*
15-
* @internal
16-
*
17-
* @deprecated The DebugAccessDecisionManager class has been renamed and is deprecated since version 3.3 and will be removed in 4.0. Use the TraceableAccessDecisionManager class instead.
18-
*
19-
* This is a placeholder for the old class, that got renamed; this is not a BC break since the class is internal, this
20-
* placeholder is here just to help backward compatibility with older SecurityBundle versions.
21-
*/
14+
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
15+
2216
class_exists(TraceableAccessDecisionManager::class);
17+
18+
if (false) {
19+
/**
20+
* This is a placeholder for the old class, that got renamed; this is not a BC break since the class is internal, this
21+
* placeholder is here just to help backward compatibility with older SecurityBundle versions.
22+
*
23+
* @deprecated The DebugAccessDecisionManager class has been renamed and is deprecated since version 3.3 and will be removed in 4.0. Use the TraceableAccessDecisionManager class instead.
24+
*
25+
* @internal
26+
*/
27+
class DebugAccessDecisionManager implements AccessDecisionManagerInterface
28+
{
29+
/**
30+
* {@inheritdoc}
31+
*/
32+
public function decide(TokenInterface $token, array $attributes, $object = null)
33+
{
34+
}
35+
}
36+
}

src/Symfony/Component/Security/Core/Authorization/TraceableAccessDecisionManager.php

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

1414
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
15+
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
1516

1617
/**
1718
* Decorates the original AccessDecisionManager class to log information

0 commit comments

Comments
 (0)
0