minor #25026 [MonologBridge][WebServerBundle] Add suggestions for using the log server (maidmaid)

This PR was merged into the 3.3 branch.

Discussion
----------

[MonologBridge][WebServerBundle] Add suggestions for using the log server

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | /
| License       | MIT
| Doc PR        | /

If you want launch `server:log`, you need the monolog bridge and the VarDumper. Optionally, you need EL if you want use `server:log --filter`.

Commits
-------

aca0ddd Add suggestions
This commit is contained in:
Nicolas Grekas 2017-12-12 09:03:31 +01:00
commit 6e29f187b7
3 changed files with 12 additions and 1 deletions

View File

@ -31,7 +31,8 @@
"suggest": {
"symfony/http-kernel": "For using the debugging handlers together with the response life cycle of the HTTP kernel.",
"symfony/console": "For the possibility to show log messages in console commands depending on verbosity settings. You need version ~2.3 of the console for it.",
"symfony/event-dispatcher": "Needed when using log messages in console commands."
"symfony/event-dispatcher": "Needed when using log messages in console commands.",
"symfony/var-dumper": "For using the debugging handlers like the console handler or the log server handler."
},
"autoload": {
"psr-4": { "Symfony\\Bridge\\Monolog\\": "" },

View File

@ -11,6 +11,7 @@
namespace Symfony\Bundle\WebServerBundle\Command;
use Monolog\Formatter\FormatterInterface;
use Symfony\Bridge\Monolog\Formatter\ConsoleFormatter;
use Symfony\Bridge\Monolog\Handler\ConsoleHandler;
use Symfony\Component\Console\Command\Command;
@ -35,6 +36,11 @@ class ServerLogCommand extends Command
return false;
}
// based on a symfony/symfony package, it crashes due a missing FormatterInterface from monolog/monolog
if (!class_exists(FormatterInterface::class)) {
return false;
}
return parent::isEnabled();
}

View File

@ -30,6 +30,10 @@
"conflict": {
"symfony/dependency-injection": "<3.3"
},
"suggest": {
"symfony/monolog-bridge": "For using the log server.",
"symfony/expression-language": "For using the filter option of the log server."
},
"minimum-stability": "dev",
"extra": {
"branch-alias": {