Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 458b294

Browse filesBrowse files
committed
bug #47218 [Console] fix dispatch signal event check for compatibility with the contract interface (xabbuh)
This PR was merged into the 5.4 branch. Discussion ---------- [Console] fix dispatch signal event check for compatibility with the contract interface | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #45333 (comment) | License | MIT | Doc PR | Commits ------- 6b29591 fix dispatch signal event check for compatibility with the contract interface
2 parents ea7149a + 6b29591 commit 458b294
Copy full SHA for 458b294

File tree

1 file changed

+2
-3
lines changed
Filter options

1 file changed

+2
-3
lines changed

‎src/Symfony/Component/Console/Application.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Application.php
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -985,9 +985,8 @@ protected function doRunCommand(Command $command, InputInterface $input, OutputI
985985

986986
if ($this->signalsToDispatchEvent) {
987987
$commandSignals = $command instanceof SignalableCommandInterface ? $command->getSubscribedSignals() : [];
988-
$dispatchSignals = $this->dispatcher && $this->dispatcher->hasListeners(ConsoleEvents::SIGNAL);
989988

990-
if ($commandSignals || $dispatchSignals) {
989+
if ($commandSignals || null !== $this->dispatcher) {
991990
if (!$this->signalRegistry) {
992991
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.');
993992
}
@@ -1007,7 +1006,7 @@ protected function doRunCommand(Command $command, InputInterface $input, OutputI
10071006
}
10081007
}
10091008

1010-
if ($dispatchSignals) {
1009+
if (null !== $this->dispatcher) {
10111010
foreach ($this->signalsToDispatchEvent as $signal) {
10121011
$event = new ConsoleSignalEvent($command, $input, $output, $signal);
10131012

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.