Skip to content

Commit 485e59f

Browse files
Ignore call of setter if translator is not available and remove not necessary nullable of setter parameter
1 parent 4291f7f commit 485e59f

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Symfony/Bundle/SecurityBundle/Resources/config/security_authenticator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
abstract_arg('options'),
144144
service('property_accessor')->nullOnInvalid(),
145145
])
146-
->call('setTranslator', [service('translator')->nullOnInvalid()])
146+
->call('setTranslator', [service('translator')->ignoreOnInvalid()])
147147

148148
->set('security.authenticator.remember_me', RememberMeAuthenticator::class)
149149
->abstract()

src/Symfony/Bundle/SecurityBundle/Resources/config/security_listeners.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
service('event_dispatcher')->nullOnInvalid(),
190190
service('property_accessor')->nullOnInvalid(),
191191
])
192-
->call('setTranslator', [service('translator')->nullOnInvalid()])
192+
->call('setTranslator', [service('translator')->ignoreOnInvalid()])
193193
->tag('monolog.logger', ['channel' => 'security'])
194194

195195
->set('security.authentication.listener.remote_user', RemoteUserAuthenticationListener::class)

src/Symfony/Component/Security/Http/Authenticator/JsonLoginAuthenticator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public function isInteractive(): bool
143143
return true;
144144
}
145145

146-
public function setTranslator(?TranslatorInterface $translator)
146+
public function setTranslator(TranslatorInterface $translator)
147147
{
148148
$this->translator = $translator;
149149
}

src/Symfony/Component/Security/Http/Firewall/UsernamePasswordJsonAuthenticationListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public function setSessionAuthenticationStrategy(SessionAuthenticationStrategyIn
216216
$this->sessionStrategy = $sessionStrategy;
217217
}
218218

219-
public function setTranslator(?TranslatorInterface $translator)
219+
public function setTranslator(TranslatorInterface $translator)
220220
{
221221
$this->translator = $translator;
222222
}

0 commit comments

Comments
 (0)