c2a6ddc0ea
This PR was merged into the 3.3-dev branch. Discussion ---------- [Console][FrameworkBundle] Log console exceptions | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #10895 | License | MIT | Doc PR | https://github.com/symfony/symfony-docs/pull/7373 Continues #19382, fixing some issues including: - ability to display the input string for any `InputInterface` implementation (cast to string if possible, use the command name otherwise) - if the input can be casted as string, cleanup the result (from `command "'command:name' --foo=bar" ` to `command "command:name --foo=bar"`) - made `ExceptionLister::$logger` private instead of protected - changed methods name from `onKernel*` to `onConsole*` (e.g. `onConsoleException`) and removed unnecessary doc blocks - Added more tests Log for an exception: > [2016-12-22 00:34:42] app.ERROR: Exception thrown while running command: "cache:clear -vvv". Message: "An error occured!" {"exception":"[object] (RuntimeException(code: 0): An error occured! at /Volumes/HD/Sites/tests/sf-demo-3.2/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php:61)","command":"cache:clear -vvv","message":"An error occured!"} [] Commits ------- |
||
---|---|---|
.. | ||
Command | ||
DependencyInjection | ||
Descriptor | ||
Event | ||
EventListener | ||
Exception | ||
Formatter | ||
Helper | ||
Input | ||
Logger | ||
Output | ||
Question | ||
Resources/bin | ||
Style | ||
Tester | ||
Tests | ||
.gitignore | ||
Application.php | ||
CHANGELOG.md | ||
composer.json | ||
ConsoleEvents.php | ||
LICENSE | ||
phpunit.xml.dist | ||
README.md | ||
Terminal.php |
Console Component
The Console component eases the creation of beautiful and testable command line interfaces.
Resources
Credits
Resources/bin/hiddeninput.exe
is a third party binary provided within this
component. Find sources and license at https://github.com/Seldaek/hidden-input.