Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Symfony/Bridge/Monolog/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\\": "" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -35,6 +36,11 @@ public function isEnabled()
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();
}

Expand Down
4 changes: 4 additions & 0 deletions src/Symfony/Bundle/WebServerBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down