Symfony Messenger Undefined constant SIGTERM

453 views Asked by At

I have a problem with Symfony messenger, I have installed the redis extension, Symfony Messenger Redis package and the problem occurs when the command "php bin/console messenger:consume async" is executed and an error is generated " php.CRITICAL: Uncaught Error: Undefined constant "SIGTERM"", transport and routing are already configured.

file: config/packages/messenger.yaml

framework:
    messenger:
        transports:
            async: '%env(MESSENGER_TRANSPORT_DSN)%'
        routing:
            App\Message\SendMailMessage: async

enter image description here

The redis extension is already installed. Does anyone have a solution to this problem?

Installed packages

Symfony v6.3.3 Symfony/Messenger v6.3.2 Symfony/Redis-Messenger v6.3.5

PHP 8.2.8

I have uninstalled the packages and installed them again and the problem still occurs, the transports and messenger routes have been configured, but it still does not work.

2

There are 2 answers

0
Alberto Fecchi On BEST ANSWER

Be sure to have pcntl extension installed and enabled in your environment.

2
Jan Stefanides On

Same error here, after upgrade symfony/messenger from v6.3.3 to v6.3.5 (or any other related package?), no Symfony/Redis-Messenger. Adding pcntl helps - just such dependency should be better documented/required by composer? :-(