bug #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 | #21246
| License       | MIT
| Doc PR        |n/a

Finish #19443. Alternative to #21246.

Commits
-------

ab133caa8c [FrameworkBundle] Prevent an error when the console component isn't installed
This commit is contained in:
Fabien Potencier 2017-01-12 10:31:45 -08:00
commit bcab8b8ac8

View File

@ -80,7 +80,9 @@ class FrameworkBundle extends Bundle
$container->addCompilerPass(new TemplatingPass());
$container->addCompilerPass(new AddConstraintValidatorsPass(), PassConfig::TYPE_BEFORE_REMOVING);
$container->addCompilerPass(new AddValidatorInitializersPass());
$container->addCompilerPass(new AddConsoleCommandPass());
if (class_exists(AddConsoleCommandPass::class)) {
$container->addCompilerPass(new AddConsoleCommandPass());
}
$container->addCompilerPass(new FormPass());
$container->addCompilerPass(new TranslatorPass());
$container->addCompilerPass(new LoggingTranslatorPass());