Skip to content

Commit

Permalink
Prevent auto-registration of UserPasswordEncoderCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
chalasr committed May 22, 2017
1 parent 82ec56b commit b39b35b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Expand Up @@ -98,11 +98,11 @@ public function load(array $configs, ContainerBuilder $container)

if ($config['encoders']) {
$this->createEncoders($config['encoders'], $container);
}

if (class_exists(Application::class)) {
$loader->load('console.xml');
$container->getDefinition('security.console.user_password_encoder_command')->replaceArgument(1, array_keys($config['encoders']));
}
if (class_exists(Application::class)) {
$loader->load('console.xml');
$container->getDefinition('security.console.user_password_encoder_command')->replaceArgument(1, array_keys($config['encoders']));
}

// load ACL
Expand Down
Expand Up @@ -345,6 +345,11 @@ public function testUserCheckerConfigWithNoCheckers()
$this->assertEquals('security.user_checker', $this->getContainer('container1')->getAlias('security.user_checker.secure'));
}

public function testUserPasswordEncoderCommandIsRegistered()
{
$this->assertTrue($this->getContainer('remember_me_options')->has('security.console.user_password_encoder_command'));
}

protected function getContainer($file)
{
$file = $file.'.'.$this->getFileExtension();
Expand Down

0 comments on commit b39b35b

Please sign in to comment.