Prevent auto-registration of UserPasswordEncoderCommand
This commit is contained in:
parent
82ec56b40c
commit
b39b35b95d
@ -98,11 +98,11 @@ class SecurityExtension extends Extension
|
|||||||
|
|
||||||
if ($config['encoders']) {
|
if ($config['encoders']) {
|
||||||
$this->createEncoders($config['encoders'], $container);
|
$this->createEncoders($config['encoders'], $container);
|
||||||
|
}
|
||||||
|
|
||||||
if (class_exists(Application::class)) {
|
if (class_exists(Application::class)) {
|
||||||
$loader->load('console.xml');
|
$loader->load('console.xml');
|
||||||
$container->getDefinition('security.console.user_password_encoder_command')->replaceArgument(1, array_keys($config['encoders']));
|
$container->getDefinition('security.console.user_password_encoder_command')->replaceArgument(1, array_keys($config['encoders']));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// load ACL
|
// load ACL
|
||||||
|
@ -345,6 +345,11 @@ abstract class CompleteConfigurationTest extends TestCase
|
|||||||
$this->assertEquals('security.user_checker', $this->getContainer('container1')->getAlias('security.user_checker.secure'));
|
$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)
|
protected function getContainer($file)
|
||||||
{
|
{
|
||||||
$file = $file.'.'.$this->getFileExtension();
|
$file = $file.'.'.$this->getFileExtension();
|
||||||
|
Reference in New Issue
Block a user