Skip to content

Commit 07cab33

Browse files
committed
compatibility
1 parent 47ef31e commit 07cab33

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"php": "^8.0",
1313
"ext-json": "*",
1414
"illuminate/queue": "^9.0|^10.0",
15-
"php-amqplib/php-amqplib": "^v3.2"
15+
"php-amqplib/php-amqplib": "^v3.3"
1616
},
1717
"require-dev": {
1818
"phpunit/phpunit": "^9.3",

src/Queue/Connection/ConnectionFactory.php

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ protected static function createSocketConnection($connection, AMQPConnectionConf
9191
$config->getVhost(),
9292
$config->isInsist(),
9393
$config->getLoginMethod(),
94-
$config->getLoginResponse() ?? null,
94+
$config->getLoginResponse(),
9595
$config->getLocale(),
9696
$config->getReadTimeout(),
9797
$config->isKeepalive(),
@@ -159,25 +159,16 @@ protected static function getReadWriteTimeout(AMQPConnectionConfig $config): flo
159159

160160
protected static function getSslOptions(AMQPConnectionConfig $config): array
161161
{
162-
$path = null;
163-
if (method_exists($config, 'getSslCaPath')) {
164-
$path = $config->getSslCaPath();
165-
}
166-
$securityLevel = null;
167-
if (method_exists($config, 'getSslSecurityLevel')) {
168-
$securityLevel = $config->getSslSecurityLevel();
169-
}
170-
171162
return array_filter([
172163
'cafile' => $config->getSslCaCert(),
173-
'capath' => $path,
164+
'capath' => $config->getSslCaPath(),
174165
'local_cert' => $config->getSslCert(),
175166
'local_pk' => $config->getSslKey(),
176167
'verify_peer' => $config->getSslVerify(),
177168
'verify_peer_name' => $config->getSslVerifyName(),
178169
'passphrase' => $config->getSslPassPhrase(),
179170
'ciphers' => $config->getSslCiphers(),
180-
'security_level' => $securityLevel,
171+
'security_level' => $config->getSslSecurityLevel(),
181172
], static function ($value) {
182173
return $value !== null;
183174
});

0 commit comments

Comments
 (0)