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 ;
60
61
use Symfony \Component \Security \Core \User \UserProviderInterface ;
61
62
use Symfony \Component \Security \Http \Authenticator \Debug \TraceableAuthenticatorManagerListener ;
62
63
use Symfony \Component \Security \Http \Event \CheckPassportEvent ;
63
- use Symfony \Flex \Command \InstallRecipesCommand ;
64
64
65
65
/**
66
66
* SecurityExtension.
@@ -91,7 +91,7 @@ public function prepend(ContainerBuilder $container): void
91
91
public function load (array $ configs , ContainerBuilder $ container ): void
92
92
{
93
93
if (!array_filter ($ configs )) {
94
- $ hint = class_exists (InstallRecipesCommand ::class) ? 'Try running "composer symfony:recipes:install symfony/security-bundle". ' : 'Please define your settings for the "security" config section. ' ;
94
+ $ 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. ' ;
95
95
96
96
throw new InvalidConfigurationException ('The SecurityBundle is enabled but is not configured. ' .$ hint );
97
97
}
You can’t perform that action at this time.
0 commit comments