Skip to content

Commit

Permalink
bug #22664 [Security] Fix TraceableAccessDecisionManager / DebugAcces…
Browse files Browse the repository at this point in the history
…sDecisionManager 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
  • Loading branch information
fabpot committed May 11, 2017
2 parents b33f1df + 5b123b9 commit 83114ad
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
Expand Up @@ -11,12 +11,26 @@

namespace Symfony\Component\Security\Core\Authorization;

/*
* @internal
*
* @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.
*
* This is a placeholder for the old class, that got renamed; this is not a BC break since the class is internal, this
* placeholder is here just to help backward compatibility with older SecurityBundle versions.
*/
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;

class_exists(TraceableAccessDecisionManager::class);

if (false) {
/**
* This is a placeholder for the old class, that got renamed; this is not a BC break since the class is internal, this
* placeholder is here just to help backward compatibility with older SecurityBundle versions.
*
* @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.
*
* @internal
*/
class DebugAccessDecisionManager implements AccessDecisionManagerInterface
{
/**
* {@inheritdoc}
*/
public function decide(TokenInterface $token, array $attributes, $object = null)
{
}
}
}
Expand Up @@ -12,6 +12,7 @@
namespace Symfony\Component\Security\Core\Authorization;

use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;

/**
* Decorates the original AccessDecisionManager class to log information
Expand Down

0 comments on commit 83114ad

Please sign in to comment.