prolic / HumusAmqp

PHP 7.4 AMQP library
https://humusamqp.readthedocs.io/
MIT License
76 stars 17 forks source link

Fatal Error due to conflicting constructor signature for AmqpExtension::Envelope #18

Closed basz closed 8 years ago

basz commented 8 years ago

When consuming a message a Fatal Error occurs

Fatal error: Uncaught TypeError: Argument 1 passed to Humus\Amqp\Driver\AmqpExtension\Envelope::__construct() must be an instance of AMQPBasicProperties, instance of AMQPEnvelope given, called in .../vendor/prolic/humus-amqp/src/Driver/AmqpExtension/Queue.php on line 159 and defined in .../vendor/prolic/humus-amqp/src/Driver/AmqpExtension/Envelope.php:42

Which seems logical because of these definitions: https://github.com/prolic/HumusAmqp/blob/master/src/Driver/AmqpExtension/Queue.php#L158-L159 https://github.com/prolic/HumusAmqp/blob/master/src/Driver/AmqpExtension/Envelope.php#L42

I can 'open' (PHPStorm) \AMQPEnvelope but not \AMQPBasicProperties.

prolic commented 8 years ago

As said in the PR, you have to compile ext-amqp from master.