Skip to content

Commit

Permalink
Tests for php 8.3 and php 8.4 (#186)
Browse files Browse the repository at this point in the history
* Tests for php 8.3 and php 8.4

* php 8.4 will no longer supports implicit null ie `array $foo = null`. To maintain compatibility with php 7.1 and earlier, remove the type argument

---------

Co-authored-by: Xon <635541+Xon@users.noreply.github.com>
  • Loading branch information
Xon and Xon committed Apr 2, 2024
1 parent 40bf00e commit ba53f7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jobs:
phpunit: '^9'
- php-version: '8.2'
phpunit: '^9'
- php-version: '8.3'
phpunit: '^9'
- php-version: '8.4'
phpunit: '^9'
name: PHP ${{ matrix.php-version }}
steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ public function getSslMeta()
* @param array|null $tlsOptions The TLS/SSL context options. See https://www.php.net/manual/en/context.ssl.php for details
* @throws CredisException
*/
public function __construct($host = '127.0.0.1', $port = 6379, $timeout = null, $persistent = '', $db = 0, $password = null, $username = null, array $tlsOptions = null)
public function __construct($host = '127.0.0.1', $port = 6379, $timeout = null, $persistent = '', $db = 0, $password = null, $username = null, $tlsOptions = null)
{
$this->host = (string)$host;
if ($port !== null) {
Expand All @@ -360,7 +360,7 @@ public function __construct($host = '127.0.0.1', $port = 6379, $timeout = null,
$this->authUsername = $username;
$this->selectedDb = (int)$db;
$this->convertHost();
if ($tlsOptions) {
if (is_array($tlsOptions) && count($tlsOptions) !== 0) {
$this->setTlsOptions($tlsOptions);
}
// PHP Redis extension support TLS/ACL AUTH since 5.3.0
Expand Down

0 comments on commit ba53f7e

Please sign in to comment.