Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ private function createUserProviders($config, ContainerBuilder $container)
// Parses a <provider> tag and returns the id for the related user provider service
private function createUserDaoProvider($name, $provider, ContainerBuilder $container)
{
$name = $this->getUserProviderId(strtolower($name));
$name = $this->getUserProviderId($name);

// Doctrine Entity and In-memory DAO provider are managed by factories
foreach ($this->userProviderFactories as $factory) {
Expand All @@ -582,7 +582,7 @@ private function createUserDaoProvider($name, $provider, ContainerBuilder $conta
if (isset($provider['chain'])) {
$providers = array();
foreach ($provider['chain']['providers'] as $providerName) {
$providers[] = new Reference($this->getUserProviderId(strtolower($providerName)));
$providers[] = new Reference($this->getUserProviderId($providerName));
}

$container
Expand All @@ -597,7 +597,7 @@ private function createUserDaoProvider($name, $provider, ContainerBuilder $conta

private function getUserProviderId($name)
{
return 'security.user.provider.concrete.'.$name;
return 'security.user.provider.concrete.'.strtolower($name);
}

private function createExceptionListener($container, $config, $id, $defaultEntryPoint, $stateless)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

return array(
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
imports:
- { resource: ./../config/framework.yml }

doctrine:
dbal:
driver: pdo_sqlite
memory: true
charset: UTF8

orm:
entity_managers:
default:

auto_mapping: true

security:
providers:
camelCasedName:
entity:
class: Symfony\Component\Security\Core\User\User

firewalls:
default:
anonymous: ~
provider: camelCasedName

encoders:
Symfony\Component\Security\Core\User\User: plaintext


Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Bundle\SecurityBundle\Tests\Functional;

class CamelCasedProvidersCausesExceptionsTest extends WebTestCase
{
public function testBugfixExceptionThenCamelCasedProviderIsGiven()
{
$client = $this->createClient(array('test_case' => 'CamelCasedProviders', 'root_config' => 'config.yml'));
}
}