8000 [Console] ensure integer exit codes in events · richsage/symfony@fe1db71 · GitHub
[go: up one dir, main page]

Skip to content

Commit fe1db71

Browse files
committed
[Console] ensure integer exit codes in events
1 parent 89c2591 commit fe1db71

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

src/Symfony/Component/Console/Event/ConsoleCommandEvent.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111

1212
namespace Symfony\Component\Console\Event;
1313

14-
use Symfony\Component\Console\Command\Command;
15-
use Symfony\Component\Console\Input\InputInterface;
16-
use Symfony\Component\Console\Output\OutputInterface;
17-
1814
/**
1915
* Allows to do things before the command is executed.
2016
*

src/Symfony/Component/Console/Event/ConsoleForExceptionEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct(Command $command, InputInterface $input, OutputInter
3030
parent::__construct($command, $input, $output);
3131

3232
$this->setException($exception);
33-
$this->exitCode = $exitCode;
33+
$this->exitCode = (int) $exitCode;
3434
}
3535

3636
/**

src/Symfony/Component/Console/Event/ConsoleTerminateEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct(Command $command, InputInterface $input, OutputInter
4343
*/
4444
public function setExitCode($exitCode)
4545
{
46-
$this->exitCode = $exitCode;
46+
$this->exitCode = (int) $exitCode;
4747
}
4848

4949
/**

0 commit comments

Comments
 (0)
0