File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Bundle \SecurityBundle \DependencyInjection ;
1313
14+ use Composer \InstalledVersions ;
1415use Symfony \Bridge \Twig \Extension \LogoutUrlExtension ;
1516use Symfony \Bundle \SecurityBundle \DependencyInjection \Security \Factory \AuthenticatorFactoryInterface ;
1617use Symfony \Bundle \SecurityBundle \DependencyInjection \Security \Factory \FirewallListenerFactoryInterface ;
6162use Symfony \Component \Security \Http \Authenticator \Debug \TraceableAuthenticator ;
6263use Symfony \Component \Security \Http \Authenticator \Debug \TraceableAuthenticatorManagerListener ;
6364use Symfony \Component \Security \Http \Event \CheckPassportEvent ;
64- use Symfony \Flex \Command \InstallRecipesCommand ;
6565
6666/**
6767 * SecurityExtension.
@@ -92,7 +92,7 @@ public function prepend(ContainerBuilder $container): void
9292 public function load (array $ configs , ContainerBuilder $ container ): void
9393 {
9494 if (!array_filter ($ configs )) {
95- $ hint = class_exists (InstallRecipesCommand ::class) ? 'Try running "composer symfony:recipes:install symfony/security-bundle". ' : 'Please define your settings for the "security" config section. ' ;
95+ $ 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. ' ;
9696
9797 throw new InvalidConfigurationException ('The SecurityBundle is enabled but is not configured. ' .$ hint );
9898 }
You can’t perform that action at this time.
0 commit comments