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

Skip to content

[SecurityBundle] Enhance FirewallContext::getListeners() #22475

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

Merged
merged 1 commit into from
Apr 26, 2017
Merged

[SecurityBundle] Enhance FirewallContext::getListeners() #22475

merged 1 commit into from
Apr 26, 2017

Conversation

ro0NL
Copy link
Contributor

@ro0NL ro0NL commented Apr 19, 2017

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #20417 (comment), #20417 (comment)
License MIT
Doc PR symfony/symfony-docs#...

I think @stof is right.. and the fact we can do this on master currently without the hassle.

cc @chalasr

Copy link
Member

@chalasr chalasr left a comment

Choose a reason for hiding this comment

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

👍

@ro0NL
Copy link
Contributor Author

ro0NL commented Apr 19, 2017

OK.. im getting some root issues here; ie. the FirewallMapInterface::getListeners() actually documents this return type; and now tests are mysteriously broken. FirewallContext doesnt implement it.. but this change seems to have effect elsewere;

Call to undefined method Symfony\Component\Security\Http\Firewall\ContextListener::register() in /var/www/html/symfony/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall.php on line 64

Looking at it.. @chalasr any headsup? Should we still do this PR?

@chalasr
Copy link
Member

chalasr commented Apr 19, 2017

@ro0NL

diff --git a/src/Symfony/Bundle/SecurityBundle/Security/FirewallMap.php b/src/Symfony/Bundle/SecurityBundle/Security/FirewallMap.php
index a511193..55272ec 100644
--- a/src/Symfony/Bundle/SecurityBundle/Security/FirewallMap.php
+++ b/src/Symfony/Bundle/SecurityBundle/Security/FirewallMap.php
@@ -124,7 +124,7 @@ class _FirewallMap
             return array(array(), null);
         }
 
-        return $context->getListeners();
+        return array($context->getListeners(), $context->getExceptionListener());
     }
 
     /**

should make this green.
Having FirewallMap::getListeners() returning the current return value of Firewall::getListeners() (both exception and normal listeners) cannot be changed as the security component provides an array oriented FirewallMap, and its imposed by FirewallMapInterface anyway. This change is still fine to me :)

@ro0NL
Copy link
Contributor Author

ro0NL commented Apr 19, 2017

Of course.... thanks :)

@nicolas-grekas nicolas-grekas requested a review from stof April 20, 2017 14:40
@nicolas-grekas nicolas-grekas added this to the 3.3 milestone Apr 20, 2017
Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

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

👍

@fabpot
Copy link
Member

fabpot commented Apr 26, 2017

Thank you @ro0NL.

@fabpot fabpot merged commit ba65078 into symfony:master Apr 26, 2017
fabpot added a commit that referenced this pull request Apr 26, 2017
… (ro0NL)

This PR was merged into the 3.3-dev branch.

Discussion
----------

[SecurityBundle] Enhance FirewallContext::getListeners()

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #20417 (comment), #20417 (comment)
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

I think @stof is right.. and the fact we can do this on master currently without the hassle.

cc @chalasr

Commits
-------

ba65078 [SecurityBundle] Enhance FirewallContext::getListeners()
@ro0NL ro0NL deleted the firewallcontext branch April 28, 2017 07:15
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