Skip to content

Commit

Permalink
Preserve PhpAmqpLib 2 compatibility (#732)
Browse files Browse the repository at this point in the history
  • Loading branch information
l-vo authored Oct 29, 2024
1 parent 6b8b029 commit fc816b7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace OldSound\RabbitMqBundle\DependencyInjection;

use OldSound\RabbitMqBundle\RabbitMq\Producer;
use PhpAmqpLib\Connection\AMQPConnectionConfig;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
Expand Down Expand Up @@ -76,11 +75,11 @@ protected function addConnections(ArrayNodeDefinition $node)
->scalarNode('vhost')->defaultValue('/')->end()
->enumNode('login_method')
->values([
AMQPConnectionConfig::AUTH_AMQPPLAIN,
AMQPConnectionConfig::AUTH_PLAIN,
AMQPConnectionConfig::AUTH_EXTERNAL,
'AMQPLAIN', // Can be replaced by AMQPConnectionConfig constants when PhpAmqpLib 2 support is dropped
'PLAIN',
'EXTERNAL',
])
->defaultValue(AMQPConnectionConfig::AUTH_AMQPPLAIN)
->defaultValue('AMQPLAIN')
->end()
->arrayNode('hosts')
->info('connection_timeout, read_write_timeout, use_socket, ssl_context, keepalive,
Expand Down

0 comments on commit fc816b7

Please sign in to comment.