bug #25027 [FrameworkBundle] Hide server:log command based on deps (sroze)
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Hide server:log command based on deps
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25025
| License | MIT
| Doc PR | ø
Remove the `server:log` command if monolog is not installed.
Commits
-------
b505ac7
Remove the `server:log` command if monolog is not loaded
This commit is contained in:
commit
a8afcba005
@ -11,6 +11,7 @@
|
||||
|
||||
namespace Symfony\Bundle\WebServerBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Bridge\Monolog\Formatter\ConsoleFormatter;
|
||||
use Symfony\Component\DependencyInjection\Extension\Extension;
|
||||
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
@ -25,5 +26,9 @@ class WebServerExtension extends Extension
|
||||
{
|
||||
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
||||
$loader->load('webserver.xml');
|
||||
|
||||
if (!class_exists(ConsoleFormatter::class)) {
|
||||
$container->removeDefinition('web_server.command.server_log');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user