You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AMQPSSLConnection class extends the AMQPStreamConnection class.
You should still be able to use the AMQPStreamConnection class when setting the ssl_context option. This is prevented by the new check now at https://github.com/mikemadisonweb/yii2-rabbitmq/blob/2.3.1/Configuration.php#L279. This check should allow AMQPStreamConnection to be used in combination with the ssl_context option.
Explanation
I can see the latest commit was to solve a SSL problem: 2c5552a
This results in the following exception:
Now you would get this error first:
Exception 'mikemadisonweb\rabbitmq\exceptions\InvalidConfigException' with message 'If you are using a ssl connection, the connection type must be AMQPSSLConnection::class'
So if i change the configuration to use the AMQPSSLConnection::class and set the ssl_options i get the following:
Hi,
In the update to version 2.3.1 is a little configuration bug.
Problem:
The validation does not approve of the
ssl_options
setting for a connection configured by the AMQPSSLConnection class. (https://github.com/php-amqplib/php-amqplib/blob/v2.9.0/PhpAmqpLib/Connection/AMQPSSLConnection.php)Validator checks configured connection options against the default connection options set at https://github.com/mikemadisonweb/yii2-rabbitmq/blob/master/Configuration.php#L35
The newly added
ssl_options
property misses here.Solution:
ssl_options
property to the default configuration at https://github.com/mikemadisonweb/yii2-rabbitmq/blob/master/Configuration.php#L35. Set to NULL.You should still be able to use the AMQPStreamConnection class when setting the
ssl_context
option. This is prevented by the new check now at https://github.com/mikemadisonweb/yii2-rabbitmq/blob/2.3.1/Configuration.php#L279. This check should allow AMQPStreamConnection to be used in combination with thessl_context
option.Explanation
I can see the latest commit was to solve a SSL problem:
2c5552a
This made it mandatory to use the AMQPSSLConnection class. (https://github.com/php-amqplib/php-amqplib/blob/v2.9.0/PhpAmqpLib/Connection/AMQPSSLConnection.php)
Before this update i would set the ssl_context option like so:
This results in the following exception:
Now you would get this error first:
So if i change the configuration to use the
AMQPSSLConnection::class
and set thessl_options
i get the following:Notice we now have to use ssl_options which will create the context for us instead of making the context ourselves.
Now i get the following error:
Which is to conclude that either the
ssl_options
property has to be added to the default configuration (constant DEFAULTS)The text was updated successfully, but these errors were encountered: