Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
strategy:
matrix:
php:
- 8.5
- 8.4
- 8.3
- 8.2
Expand All @@ -21,7 +22,7 @@ jobs:
- 7.2
- 7.1
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
Expand All @@ -46,6 +47,7 @@ jobs:
strategy:
matrix:
php:
- 8.5
- 8.4
- 8.3
- 8.2
Expand All @@ -56,7 +58,7 @@ jobs:
- 7.2
- 7.1
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
"php": ">=7.1",
"clue/redis-protocol": "^0.3.2",
"evenement/evenement": "^3.0 || ^2.0 || ^1.0",
"react/event-loop": "^1.2",
"react/promise": "^3.2",
"react/socket": "^1.16"
"react/event-loop": "^1.6",
"react/promise": "^3.3",
"react/socket": "^1.17"
},
"require-dev": {
"phpstan/phpstan": "1.12.13 || 1.4.10",
"phpstan/phpstan": "1.12.32 || 1.4.10",
"phpunit/phpunit": "^9.6 || ^7.5",
"react/async": "^4.3 || ^3.2"
},
Expand Down
20 changes: 15 additions & 5 deletions tests/RedisClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ public function setUp(): void
$this->redis = new RedisClient('localhost');

$ref = new \ReflectionProperty($this->redis, 'factory');
$ref->setAccessible(true);
if (PHP_VERSION_ID < 80100) {
$ref->setAccessible(true);
}
$ref->setValue($this->redis, $this->factory);
}

Expand Down Expand Up @@ -124,7 +126,9 @@ public function testPingWithAuthWillCreateUnderlyingClientWithAuthAndReturnPendi
{
$this->redis = new RedisClient('user:pass@localhost');
$ref = new \ReflectionProperty($this->redis, 'factory');
$ref->setAccessible(true);
if (PHP_VERSION_ID < 80100) {
$ref->setAccessible(true);
}
$ref->setValue($this->redis, $this->factory);

$promise = new Promise(function () { });
Expand All @@ -144,7 +148,9 @@ public function testPingWithUnixUriWillCreateUnderlyingClientAndReturnPendingPro
{
$this->redis = new RedisClient('redis+unix:///tmp/redis.sock');
$ref = new \ReflectionProperty($this->redis, 'factory');
$ref->setAccessible(true);
if (PHP_VERSION_ID < 80100) {
$ref->setAccessible(true);
}
$ref->setValue($this->redis, $this->factory);

$promise = new Promise(function () { });
Expand Down Expand Up @@ -193,7 +199,9 @@ public function testPingWillResolveWhenUnderlyingClientResolvesPingAndStartIdleT
$this->redis = new RedisClient('localhost?idle=10');

$ref = new \ReflectionProperty($this->redis, 'factory');
$ref->setAccessible(true);
if (PHP_VERSION_ID < 80100) {
$ref->setAccessible(true);
}
$ref->setValue($this->redis, $this->factory);

$client = $this->createMock(StreamingClient::class);
Expand All @@ -218,7 +226,9 @@ public function testPingWillResolveWhenUnderlyingClientResolvesPingAndNotStartId
$this->redis = new RedisClient('localhost?idle=-1');

$ref = new \ReflectionProperty($this->redis, 'factory');
$ref->setAccessible(true);
if (PHP_VERSION_ID < 80100) {
$ref->setAccessible(true);
}
$ref->setValue($this->redis, $this->factory);

$client = $this->createMock(StreamingClient::class);
Expand Down