Closed
Description
Description
When a command extends a class wich implements SignalableCommandInterface
but the command has empty signals to dispatch, it still can be executed, It can be useful when the extension is not available and the command is necessary.
Also, it can be used like a workaround for support other environments, for example windows servers, they don't have pcntl
extension
Example
If change this
symfony/src/Symfony/Component/Console/Application.php
Lines 950 to 956 in 39e9d75
for this
if ($command instanceof SignalableCommandInterface) {
if (!$this->signalRegistry && !(empty($this->signalsToDispatchEvent) && empty($command->getSubscribedSignals()))) {
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.');
}
Now when signalsToDispatchEvent
has signals still throws RuntimeException, but when it don't has, it continues, maybe i can make a PR