-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Log unhandled Exceptions into logfile #1482
Conversation
Declaration of Deployer\Console\Application::renderException(Exception $e, Symfony\Component\Console\Output\OutputInterface $output) should be compatible with Symfony\Component\Console\Application::renderException($e, $output)
src/Console/Application.php
Outdated
@@ -162,4 +163,15 @@ public function afterRun($callable) | |||
{ | |||
$this->after = $callable; | |||
} | |||
|
|||
public function renderException($e, $output) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm depeding on the version of symfony console we use (prefer-stable vs. prefer-lowest) php expects a different signature for this method... not sure how to handle this case...
see
https://travis-ci.org/deployphp/deployer/builds/322511665
vs
https://travis-ci.org/deployphp/deployer/builds/322477227
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking at it from a different angle. does it actually make sense that we CI build deployer with php 7.0/7.1/7.2 and prefer-stable vs. prefer-lowser, as the deployer binary/executable itself will finally be bundled with whatever the build process will decide?
it will always contain what prefer-latest will suggest and noone will use this repos in a prefer-lowest fashion, right?
the only setup we need to support is 7.0/7.1/7.2/ with the latest components, since deployer will not be included in other libs/apps as a dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually a lot of people use it as dev dependency of composer. And we need to support all of them. Mybe there is a better place to handle this logging. See CommandTask.
…le version issues
very good advice, thx for your feedback. adjusted and it seems test are passing now. |
* log symfony-console handled exceptions into logfile * log early bootstrap exceptions into logfile * updated CHANGELOG.md * fixed CS * try to fix php warning Declaration of Deployer\Console\Application::renderException(Exception $e, Symfony\Component\Console\Output\OutputInterface $output) should be compatible with Symfony\Component\Console\Application::renderException($e, $output) * log in TaskCommand instead of Application, to prevent x-symfony-console version issues
Log unhandled Exceptions into logfile