Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2a98bba

Browse filesBrowse files
committed
bug #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 #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 ------- aedf897 [SecurityBundle] providerIds is undefined error when firewall provider is not specified
2 parents 3fc59a0 + aedf897 commit 2a98bba
Copy full SHA for 2a98bba

File tree

0 file changed

+0
-0
lines changed
Filter options

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
    0 (0)
    Morty Proxy This is a proxified and sanitized view of the page, visit original site.