Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[SecurityBundle] Support autowiring for AccessDecisionManagerInterface #19684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

unexge
Copy link

@unexge unexge commented Aug 20, 2016

Q A
Branch? 3.1
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

@dunglas
Copy link
Member

dunglas commented Aug 22, 2016

Should be merged as bug fix in 2.8.

@@ -68,6 +68,11 @@ public function load(array $configs, ContainerBuilder $container)

if ($container->hasParameter('kernel.debug') && $container->getParameter('kernel.debug')) {
$loader->load('security_debug.xml');

if ($container->hasDefinition('security.access.decision_manager') && $container->hasDefinition('debug.security.access.decision_manager')) {
Copy link
Member

@dunglas dunglas Aug 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not necessary, the last loaded autowiring_types config will override previous ones. You can just add <autowiring-type>Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface</autowiring-type> to the debug.security.access.decision_manager definition and it should do the trick without having to touch the extension.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i did this first, but it didn't work.

now i did some debugging, and i guess this didn't work because, this is a decorator service.

in this case, this services takes precedence in order:

  • security.access.decision_manager
  • debug.security.access.decision_manager
  • debug.security.access.decision_manager.inner (which is alias for security.access.decision_manager)

@dunglas
Copy link
Member

dunglas commented Aug 26, 2016

👍

@HeahDude
Copy link
Contributor

@unexge can you please update the description of your PR to mention a bug fix instead of a new feature. Also you'll need to rebase on 2.8 and change the target branch thanks to new the new Github feature.

Note that the DebugAccessDecisionManager has been introduced in 3.1 so this will require some changes.

@unexge unexge changed the base branch from master to 2.8 August 27, 2016 14:25
@unexge unexge changed the base branch from 2.8 to master August 27, 2016 14:26
@unexge
Copy link
Author

unexge commented Aug 27, 2016

@HeahDude if the DebugAccessDecisionManager only available since 3.1, then shouldn't i create two PRs one for 2.8 and one for 3.1? (also i couldn't change the target branch, i don't want to break Symfony 😃 )

@fabpot
Copy link
Member

fabpot commented Sep 14, 2016

Yes, you need to create 2 PRs.

@unexge
Copy link
Author

unexge commented Sep 15, 2016

@fapbot i created a new PR for 2.8(#19941).

this PR should be targeted to 3.1, can you do that while merging or should i create a new PR?

@lemoinem
Copy link
Contributor

@unexge You can do it yourself, using the new GitHub Feature (https://github.com/blog/2224-change-the-base-branch-of-a-pull-request)

@nicolas-grekas
Copy link
Member

Closing in favor of #21517

@unexge unexge deleted the access_decision_manager_autowiring branch February 3, 2017 17:44
@nicolas-grekas nicolas-grekas modified the milestones: 3.x, 3.3 Mar 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants