Closed
Description
Symfony version(s) affected
6.3.5
Description
Due to someone's recent changes, symfony/messenger now has an implicit dependency on ext-pcntl
, which my app does not have, so simply running messenger:consume
now throws this exception.
In ConsumeMessagesCommand.php line 261:
[Error]
Undefined constant "SIGTERM"
Exception trace:
at /vendor/symfony/messenger/Command/ConsumeMessagesCommand.php:261
Symfony\Component\Messenger\Command\ConsumeMessagesCommand->getSubscribedSignals() at /vendor/symfony/console/Application.php:1003
Symfony\Component\Console\Application->doRunCommand() at /vendor/symfony/framework-bundle/Console/Application.php:91
Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /vendor/symfony/console/Application.php:320
Symfony\Component\Console\Application->doRun() at /vendor/symfony/framework-bundle/Console/Application.php:80
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /vendor/symfony/console/Application.php:174
Symfony\Component\Console\Application->run() at /vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:54
Symfony\Component\Runtime\Runner\Symfony\ConsoleApplicationRunner->run() at /vendor/autoload_runtime.php:29
require_once() at /bin/console:11
How to reproduce
Assuming you do not have pcntl
installed (php -m
):
bin/console messenger:consume
Possible Solution
Pick one:
a. Hard-code the constant values
b. Redeclare the constants in a local namespace.
c. Explicitly specify ext-pcntl
as a dependency in composer.json
.
Additional Context
No response