Skip to content

Commit 54cbb6a

Browse files
committed
Merge branch '7.2' into 7.3
* 7.2: Use Composer InstalledVersions to check if flex is installed instead of existence of InstallRecipesCommand Improve readability of disallow_search_engine_index condition [DoctrineBridge] Fix UniqueEntityValidator Stringable identifiers [DoctrineBridge] Fix UniqueEntity for non-integer identifiers [Security] Avoid failing when PersistentRememberMeHandler handles a malformed cookie [PropertyAccess] Improve PropertyAccessor::setValue param docs fix asking for the retry option although --force was used [DoctrineBridge] Undefined variable
2 parents 77c74ff + 257fb12 commit 54cbb6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

DependencyInjection/SecurityExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Bundle\SecurityBundle\DependencyInjection;
1313

14+
use Composer\InstalledVersions;
1415
use Symfony\Bridge\Twig\Extension\LogoutUrlExtension;
1516
use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\AuthenticatorFactoryInterface;
1617
use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\FirewallListenerFactoryInterface;
@@ -62,7 +63,6 @@
6263
use Symfony\Component\Security\Http\Authenticator\Debug\TraceableAuthenticator;
6364
use Symfony\Component\Security\Http\Authenticator\Debug\TraceableAuthenticatorManagerListener;
6465
use Symfony\Component\Security\Http\Event\CheckPassportEvent;
65-
use Symfony\Flex\Command\InstallRecipesCommand;
6666

6767
/**
6868
* SecurityExtension.
@@ -93,7 +93,7 @@ public function prepend(ContainerBuilder $container): void
9393
public function load(array $configs, ContainerBuilder $container): void
9494
{
9595
if (!array_filter($configs)) {
96-
$hint = class_exists(InstallRecipesCommand::class) ? 'Try running "composer symfony:recipes:install symfony/security-bundle".' : 'Please define your settings for the "security" config section.';
96+
$hint = class_exists(InstalledVersions::class) && InstalledVersions::isInstalled('symfony/flex') ? 'Try running "composer symfony:recipes:install symfony/security-bundle".' : 'Please define your settings for the "security" config section.';
9797

9898
throw new InvalidConfigurationException('The SecurityBundle is enabled but is not configured. '.$hint);
9999
}

0 commit comments

Comments
 (0)