Skip to content

Commit 29dbf80

Browse files
committed
Merge branch '2.4'
* 2.4: (35 commits) Update validators.ro.xlf add non-standard port to HTTP_HOST fixed attribute "source-language" for translations [Process] clarify idle timeout [Security] fix DI for SimpleFormAuthenticationListener Update PluralizationRules.php Update validators.pt_BR.xlf Translated remaining items (57-72) Updated Vietnamese translation allow null value in fragment handler added missing dot in translation updated Arabic translations Update validators.id.xlf [Validator] Translate validator messages into Brazilian Portuguese Added more Swedish validator translations Update validators.ca.xlf fixed typos in Welsh translation Added missing Croatian translations [Form] fixed allow render 0 and 0.0 numeric input values Fixed validators.nl.xlf ... Conflicts: src/Symfony/Bridge/Twig/composer.json
2 parents 4121b8b + 27eeb07 commit 29dbf80

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

DependencyInjection/Security/Factory/FormLoginFactory.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,10 @@ protected function createListener($container, $id, $config, $userProvider)
7575
{
7676
$listenerId = parent::createListener($container, $id, $config, $userProvider);
7777

78-
if (isset($config['csrf_provider'])) {
79-
$container
80-
->getDefinition($listenerId)
81-
->addArgument(new Reference($config['csrf_provider']))
82-
;
83-
}
78+
$container
79+
->getDefinition($listenerId)
80+
->addArgument(isset($config['csrf_provider']) ? new Reference($config['csrf_provider']) : null)
81+
;
8482

8583
return $listenerId;
8684
}

DependencyInjection/Security/Factory/SimpleFormFactory.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,14 @@ protected function createAuthProvider(ContainerBuilder $container, $id, $config,
6363
protected function createListener($container, $id, $config, $userProvider)
6464
{
6565
$listenerId = parent::createListener($container, $id, $config, $userProvider);
66-
$listener = $container->getDefinition($listenerId);
67-
68-
if (!isset($config['csrf_token_generator'])) {
69-
$listener->addArgument(null);
70-
}
7166

7267
$simpleAuthHandlerId = 'security.authentication.simple_success_failure_handler.'.$id;
7368
$simpleAuthHandler = $container->setDefinition($simpleAuthHandlerId, new DefinitionDecorator('security.authentication.simple_success_failure_handler'));
7469
$simpleAuthHandler->replaceArgument(0, new Reference($config['authenticator']));
7570
$simpleAuthHandler->replaceArgument(1, new Reference($this->getSuccessHandlerId($id)));
7671
$simpleAuthHandler->replaceArgument(2, new Reference($this->getFailureHandlerId($id)));
7772

73+
$listener = $container->getDefinition($listenerId);
7874
$listener->replaceArgument(5, new Reference($simpleAuthHandlerId));
7975
$listener->replaceArgument(6, new Reference($simpleAuthHandlerId));
8076
$listener->addArgument(new Reference($config['authenticator']));

0 commit comments

Comments
 (0)