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

Undefined constant "SIGTERM" in ConsumeMessagesCommand.php line 261 #51893

Copy link
Copy link
Closed
@Bilge

Description

@Bilge
Issue body actions

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

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