[Console] ensure integer exit codes in events
This commit is contained in:
parent
89c25911a9
commit
fe1db7125a
@ -11,10 +11,6 @@
|
||||
|
||||
namespace Symfony\Component\Console\Event;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
/**
|
||||
* Allows to do things before the command is executed.
|
||||
*
|
||||
|
@ -30,7 +30,7 @@ class ConsoleForExceptionEvent extends ConsoleEvent
|
||||
parent::__construct($command, $input, $output);
|
||||
|
||||
$this->setException($exception);
|
||||
$this->exitCode = $exitCode;
|
||||
$this->exitCode = (int) $exitCode;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -43,7 +43,7 @@ class ConsoleTerminateEvent extends ConsoleEvent
|
||||
*/
|
||||
public function setExitCode($exitCode)
|
||||
{
|
||||
$this->exitCode = $exitCode;
|
||||
$this->exitCode = (int) $exitCode;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user