Skip to content

Commit 2aeeb04

Browse files
committed
Move network_protocol up in the config object and document available protocols
1 parent f864aa8 commit 2aeeb04

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,7 @@ If for some reason you don't want the connection lazy you can turn it off by set
513513

514514
By default, the network protocol used for connection is tcp.
515515
If for some reason you want to use another network protocol, you can add the extra value in your config options.
516+
Available protocols : `tcp`, `ssl`, `tls`
516517

517518
```php
518519
'connections' => [
@@ -521,11 +522,7 @@ If for some reason you want to use another network protocol, you can add the ext
521522
'rabbitmq' => [
522523
// ...
523524

524-
'options' => [
525-
// ...
526-
527-
'network_protocol' => 'network wanted',
528-
],
525+
'network_protocol' => 'tcp',
529526
],
530527

531528
// ...

src/Queue/Connection/ConfigFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ protected static function getHeartbeatFromConfig(AMQPConnectionConfig $connectio
9494

9595
protected static function getNetworkProtocolFromConfig(AMQPConnectionConfig $connectionConfig, array $config): void
9696
{
97-
if ($networkProtocol = Arr::get($config, self::CONFIG_OPTIONS.'.network_protocol')) {
97+
if ($networkProtocol = Arr::get($config, 'network_protocol')) {
9898
$connectionConfig->setNetworkProtocol($networkProtocol);
9999
}
100100
}

0 commit comments

Comments
 (0)