Skip to content

Commit 7699bed

Browse files
committed
Merge branch '5.3' into 5.4
* 5.3: [Security] Fix TypeError message Fix misleading error on missing provider with authenticator manager
2 parents 67a5aff + 04a76b7 commit 7699bed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

DependencyInjection/SecurityExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ private function getUserProvider(ContainerBuilder $container, string $id, array
710710
return 'security.user_providers';
711711
}
712712

713-
throw new InvalidConfigurationException(sprintf('Not configuring explicitly the provider for the "%s" listener on "%s" firewall is ambiguous as there is more than one registered provider.', $factoryKey, $id));
713+
throw new InvalidConfigurationException(sprintf('Not configuring explicitly the provider for the "%s" %s on "%s" firewall is ambiguous as there is more than one registered provider.', $factoryKey, $this->authenticatorManagerEnabled ? 'authenticator' : 'listener', $id));
714714
}
715715

716716
private function createEncoders(array $encoders, ContainerBuilder $container)

Tests/DependencyInjection/SecurityExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public function testPerListenerProvider()
225225
public function testMissingProviderForListener()
226226
{
227227
$this->expectException(InvalidConfigurationException::class);
228-
$this->expectExceptionMessage('Not configuring explicitly the provider for the "http_basic" listener on "ambiguous" firewall is ambiguous as there is more than one registered provider.');
228+
$this->expectExceptionMessage('Not configuring explicitly the provider for the "http_basic" authenticator on "ambiguous" firewall is ambiguous as there is more than one registered provider.');
229229
$container = $this->getRawContainer();
230230
$container->loadFromExtension('security', [
231231
'enable_authenticator_manager' => true,

0 commit comments

Comments
 (0)