updated-packages
This commit is contained in:
@@ -15,13 +15,15 @@ namespace Symfony\Component\Console\Event;
|
||||
* Allows to do things before the command is executed, like skipping the command or changing the input.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @final since Symfony 4.4
|
||||
*/
|
||||
class ConsoleCommandEvent extends ConsoleEvent
|
||||
{
|
||||
/**
|
||||
* The return code for skipped commands, this will also be passed into the terminate event.
|
||||
*/
|
||||
const RETURN_CODE_DISABLED = 113;
|
||||
public const RETURN_CODE_DISABLED = 113;
|
||||
|
||||
/**
|
||||
* Indicates if the command should be run or skipped.
|
||||
|
@@ -53,6 +53,6 @@ final class ConsoleErrorEvent extends ConsoleEvent
|
||||
|
||||
public function getExitCode(): int
|
||||
{
|
||||
return null !== $this->exitCode ? $this->exitCode : (\is_int($this->error->getCode()) && 0 !== $this->error->getCode() ? $this->error->getCode() : 1);
|
||||
return $this->exitCode ?? (\is_int($this->error->getCode()) && 0 !== $this->error->getCode() ? $this->error->getCode() : 1);
|
||||
}
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@ class ConsoleEvent extends Event
|
||||
private $input;
|
||||
private $output;
|
||||
|
||||
public function __construct(Command $command = null, InputInterface $input, OutputInterface $output)
|
||||
public function __construct(?Command $command, InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$this->command = $command;
|
||||
$this->input = $input;
|
||||
|
@@ -19,6 +19,8 @@ use Symfony\Component\Console\Output\OutputInterface;
|
||||
* Allows to manipulate the exit code of a command after its execution.
|
||||
*
|
||||
* @author Francesco Levorato <git@flevour.net>
|
||||
*
|
||||
* @final since Symfony 4.4
|
||||
*/
|
||||
class ConsoleTerminateEvent extends ConsoleEvent
|
||||
{
|
||||
|
Reference in New Issue
Block a user