File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/Symfony/Bundle/SecurityBundle/DependencyInjection Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Bundle \SecurityBundle \DependencyInjection ;
13
13
14
+ use Composer \InstalledVersions ;
14
15
use Symfony \Bridge \Twig \Extension \LogoutUrlExtension ;
15
16
use Symfony \Bundle \SecurityBundle \DependencyInjection \Security \Factory \AuthenticatorFactoryInterface ;
16
17
use Symfony \Bundle \SecurityBundle \DependencyInjection \Security \Factory \FirewallListenerFactoryInterface ;
61
62
use Symfony \Component \Security \Http \Authenticator \Debug \TraceableAuthenticator ;
62
63
use Symfony \Component \Security \Http \Authenticator \Debug \TraceableAuthenticatorManagerListener ;
63
64
use Symfony \Component \Security \Http \Event \CheckPassportEvent ;
64
- use Symfony \Flex \Command \InstallRecipesCommand ;
65
65
66
66
/**
67
67
* SecurityExtension.
@@ -92,7 +92,7 @@ public function prepend(ContainerBuilder $container): void
92
92
public function load (array $ configs , ContainerBuilder $ container ): void
93
93
{
94
94
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. ' ;
96
96
97
97
throw new InvalidConfigurationException ('The SecurityBundle is enabled but is not configured. ' .$ hint );
98
98
}
You can’t perform that action at this time.
0 commit comments