Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd0ce2d6

Browse files
committed
bug#58643 [SecurityBundle] Use ComposerInstalledVersions to check if flex is installed (andyexeter)
This PR was submitted for the 7.1 branch but it was merged into the 7.2 branch instead.Discussion----------[SecurityBundle] Use Composer `InstalledVersions` to check if flex is installed| Q | A| ------------- | ---| Branch? | 7.1| Bug fix? | yes| New feature? | no <!-- please update src/**/CHANGELOG.md files -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Issues |Fix#58624 <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead -->| License | MITAs discussed in#58624, this fixes a class not found error which is thrown when security bundle config is missing.Commits-------5f8eb21 Use Composer InstalledVersions to check if flex is installed instead of existence of InstallRecipesCommand
2 parentse80f5d7 +5f8eb21 commitd0ce2d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php

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

1212
namespaceSymfony\Bundle\SecurityBundle\DependencyInjection;
1313

14+
useComposer\InstalledVersions;
1415
useSymfony\Bridge\Twig\Extension\LogoutUrlExtension;
1516
useSymfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\AuthenticatorFactoryInterface;
1617
useSymfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\FirewallListenerFactoryInterface;
@@ -61,7 +62,6 @@
6162
useSymfony\Component\Security\Http\Authenticator\Debug\TraceableAuthenticator;
6263
useSymfony\Component\Security\Http\Authenticator\Debug\TraceableAuthenticatorManagerListener;
6364
useSymfony\Component\Security\Http\Event\CheckPassportEvent;
64-
useSymfony\Flex\Command\InstallRecipesCommand;
6565

6666
/**
6767
* SecurityExtension.
@@ -92,7 +92,7 @@ public function prepend(ContainerBuilder $container): void
9292
publicfunctionload(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
thrownewInvalidConfigurationException('The SecurityBundle is enabled but is not configured.'.$hint);
9898
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp