Skip to content

[Messenger] Consume command returns Undefined constant "SIGTERM" error if PCNTL module not enabled #51836

@tgalcheva

Description

@tgalcheva

Symfony version(s) affected

6.3.5

Description

Working on dockerized project with shared prebuilt base image without PCNTL module enabled.

After updating to Symfony latest release 6.3.5 - the messenger:consume command no longer can be executed, it returns

image

In the latest release there is a fix for exiting messenger:failed:retry command, which introduces this implementation:

public function getSubscribedSignals(): array
    {
        return $this->signals ?? [\SIGTERM, \SIGINT];
    }

without checking if the signals are defined.

With symfony/messenger:6.3.4 there is no such problem.

According to PHP documentation:
Process Control support in PHP is not enabled by default. (https://www.php.net/manual/en/pcntl.installation.php)

How to reproduce

Run a Symfony 6.3.5 project with messenger configuration in an environment with php8.2, without pcntl extension.

Try to run php bin/console messenger:consume

Possible Solution

No response

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