File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 22
33namespace Enqueue \Bundle ;
44
5+ use Enqueue \AmqpBunny \AmqpConnectionFactory as AmqpBunnyConnectionFactory ;
6+ use Enqueue \AmqpExt \AmqpConnectionFactory as AmqpExtConnectionFactory ;
7+ use Enqueue \AmqpLib \AmqpConnectionFactory as AmqpLibConnectionFactory ;
58use Enqueue \AsyncEventDispatcher \DependencyInjection \AsyncEventsPass ;
69use Enqueue \AsyncEventDispatcher \DependencyInjection \AsyncTransformersPass ;
710use Enqueue \Bundle \DependencyInjection \Compiler \BuildClientExtensionsPass ;
@@ -54,8 +57,14 @@ public function build(ContainerBuilder $container)
5457 $ extension ->addTransportFactory (new RabbitMqStompTransportFactory ());
5558 }
5659
57- $ extension ->addTransportFactory (new AmqpTransportFactory ('amqp ' ));
58- $ extension ->addTransportFactory (new RabbitMqAmqpTransportFactory ('rabbitmq_amqp ' ));
60+ if (
61+ class_exists (AmqpBunnyConnectionFactory::class) ||
62+ class_exists (AmqpExtConnectionFactory::class) ||
63+ class_exists (AmqpLibConnectionFactory::class)
64+ ) {
65+ $ extension ->addTransportFactory (new AmqpTransportFactory ('amqp ' ));
66+ $ extension ->addTransportFactory (new RabbitMqAmqpTransportFactory ('rabbitmq_amqp ' ));
67+ }
5968
6069 if (class_exists (FsConnectionFactory::class)) {
6170 $ extension ->addTransportFactory (new FsTransportFactory ());
You can’t perform that action at this time.
0 commit comments