Skip to content

Commit bcab8b8

Browse files
committed
bug symfony#21248 [FrameworkBundle] Prevent an error when the console component isn't installed (dunglas)
This PR was merged into the 3.3-dev branch. Discussion ---------- [FrameworkBundle] Prevent an error when the console component isn't installed | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#21246 | License | MIT | Doc PR |n/a Finish symfony#19443. Alternative to symfony#21246. Commits ------- ab133ca [FrameworkBundle] Prevent an error when the console component isn't installed
2 parents 9089131 + ab133ca commit bcab8b8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ public function build(ContainerBuilder $container)
8080
$container->addCompilerPass(new TemplatingPass());
8181
$container->addCompilerPass(new AddConstraintValidatorsPass(), PassConfig::TYPE_BEFORE_REMOVING);
8282
$container->addCompilerPass(new AddValidatorInitializersPass());
83-
$container->addCompilerPass(new AddConsoleCommandPass());
83+
if (class_exists(AddConsoleCommandPass::class)) {
84+
$container->addCompilerPass(new AddConsoleCommandPass());
85+
}
8486
$container->addCompilerPass(new FormPass());
8587
$container->addCompilerPass(new TranslatorPass());
8688
$container->addCompilerPass(new LoggingTranslatorPass());

0 commit comments

Comments
 (0)