Skip to content

Commit 6f64fbc

Browse files
committed
Change default transport to 'null' which does not require any dependencies after install
1 parent 81252c2 commit 6f64fbc

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

Model/Config/Source/Transport.php

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public function toOptionArray()
2020
['value' => 'sqs', 'label' => __('Amazon AWS SQS')],
2121
['value' => 'redis', 'label' => __('Redis')],
2222
['value' => 'dbal', 'label' => __('Doctrine DBAL')],
23+
['value' => 'null', 'label' => __('Null transport')],
2324
];
2425
}
2526
}

Model/EnqueueManager.php

+11
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ public function buildConfig()
141141
case 'dbal':
142142
$config['transport'] = $this->getDbalConfig();
143143
break;
144+
case 'null':
145+
$config['transport'] = $this->getNullConfig();
146+
break;
144147
default:
145148
throw new \LogicException(sprintf('Unknown transport: "%s"', $name));
146149
}
@@ -281,4 +284,12 @@ public function getDbalConfig()
281284
'lazy' => (bool) $this->scopeConfig->getValue('enqueue/dbal/lazy'),
282285
]];
283286
}
287+
288+
/**
289+
* @return array
290+
*/
291+
private function getNullConfig(): array
292+
{
293+
return ['null' => []];
294+
}
284295
}

etc/config.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<default>
55
<enqueue>
66
<transport>
7-
<default>rabbitmq_amqp</default>
7+
<default>null</default>
88
</transport>
99
<client>
1010
<prefix>enqueue</prefix>

0 commit comments

Comments
 (0)