8000 bug #25100 [SecurityBundle] providerIds is undefined error when firew… · weaverryan/symfony@3fc59a0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3fc59a0

Browse files
committed
bug symfony#25100 [SecurityBundle] providerIds is undefined error when firewall provider is not specified (karser)
This PR was squashed before being merged into the 3.4 branch (closes symfony#25100). Discussion ---------- [SecurityBundle] providerIds is undefined error when firewall provider is not specified | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a If I don't specify user provider on a firewall, it throws an error: `Undefined variable: providerIds`. That's because of $providerIds in [3.4-RC1](https://github.com/symfony/symfony/blob/v3.4.0-RC1/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php#L696) that is not defined. ``` private function createSwitchUserListener($container, $id, $config, $defaultProvider, $stateless) { $userProvider = isset($config['provider']) ? $this->getUserProviderId($config['provider']) : ($defaultProvider ?: $this->getFirstProvider($id, 'switch_user', $providerIds)); ``` In fact, in [master](https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php#L599) it's fixed If I add a provider to the firewall, this error doesn't reproduce: ``` secured_area: switch_user: true provider: chain_provider ``` Commits ------- 3a27bba [SecurityBundle] providerIds is undefined error when firewall provider is not specified
2 parents 6c3f473 + 3a27bba commit 3fc59a0

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)
    0