Skip to content

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

@Bilge

Description

@Bilge

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy