Skip to content

Commit 4daac9a

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: fix dispatch signal event check for compatibility with the contract interface ignore missing keys when mapping DateTime objects to uninitialized arrays
2 parents bfbf0e8 + 8fe5650 commit 4daac9a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Application.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -959,9 +959,8 @@ protected function doRunCommand(Command $command, InputInterface $input, OutputI
959959

960960
if ($this->signalsToDispatchEvent) {
961961
$commandSignals = $command instanceof SignalableCommandInterface ? $command->getSubscribedSignals() : [];
962-
$dispatchSignals = $this->dispatcher && $this->dispatcher->hasListeners(ConsoleEvents::SIGNAL);
963962

964-
if ($commandSignals || $dispatchSignals) {
963+
if ($commandSignals || null !== $this->dispatcher) {
965964
if (!$this->signalRegistry) {
966965
throw new RuntimeException('Unable to subscribe to signal events. Make sure that the `pcntl` extension is installed and that "pcntl_*" functions are not disabled by your php.ini\'s "disable_functions" directive.');
967966
}
@@ -981,7 +980,7 @@ protected function doRunCommand(Command $command, InputInterface $input, OutputI
981980
}
982981
}
983982

984-
if ($dispatchSignals) {
983+
if (null !== $this->dispatcher) {
985984
foreach ($this->signalsToDispatchEvent as $signal) {
986985
$event = new ConsoleSignalEvent($command, $input, $output, $signal);
987986

0 commit comments

Comments
 (0)