Skip to content

Commit 13086ab

Browse files
authored
Fix #19: Run tests with PHP 8.2 in CI (#20)
1 parent 01bd396 commit 13086ab

6 files changed

Lines changed: 14 additions & 42 deletions

File tree

.github/workflows/build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
php: [ '8.0', '8.1' ]
32+
php:
33+
- '8.0'
34+
- '8.1'
35+
- '8.2'
36+
3337
steps:
3438
- name: Checkout
3539
uses: actions/checkout@v2

.github/workflows/mutation.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
php:
3535
- '8.0'
3636
- '8.1'
37+
- '8.2'
3738

3839
steps:
3940
- name: Checkout

.github/workflows/static.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
php:
3737
- 8.0
3838
- 8.1
39+
- 8.2
3940

4041
steps:
4142
- name: Checkout

src/RedisCache.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,6 @@ private function iterableToArray(iterable $iterable): array
245245
}
246246

247247
/**
248-
* @param string $key
249-
*
250248
* @throws InvalidArgumentException
251249
*/
252250
private function validateKey(string $key): void
@@ -273,8 +271,6 @@ private function validateKeys(array $keys): void
273271
}
274272

275273
/**
276-
* @param int|null $ttl
277-
*
278274
* @return bool
279275
*/
280276
private function isExpiredTtl(?int $ttl): bool
@@ -283,8 +279,6 @@ private function isExpiredTtl(?int $ttl): bool
283279
}
284280

285281
/**
286-
* @param int|null $ttl
287-
*
288282
* @return bool
289283
*/
290284
private function isInfinityTtl(?int $ttl): bool

tests/RedisClusterCacheTest.php

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ public function dataProvider(): array
8585
/**
8686
* @dataProvider dataProvider
8787
*
88-
* @param string $key
89-
* @param mixed $value
90-
*
9188
* @throws InvalidArgumentException
9289
*/
9390
public function testSet(string $key, mixed $value): void
@@ -100,9 +97,6 @@ public function testSet(string $key, mixed $value): void
10097
/**
10198
* @dataProvider dataProvider
10299
*
103-
* @param string $key
104-
* @param mixed $value
105-
*
106100
* @throws InvalidArgumentException
107101
*/
108102
public function testSetWithTtl(string $key, mixed $value): void
@@ -252,12 +246,9 @@ public function dataProviderNormalizeTtl(): array
252246
/**
253247
* @dataProvider dataProviderNormalizeTtl
254248
*
255-
* @param mixed $ttl
256-
* @param mixed $expectedResult
257-
*
258249
* @throws ReflectionException
259250
*/
260-
public function testNormalizeTtl($ttl, $expectedResult): void
251+
public function testNormalizeTtl(mixed $ttl, mixed $expectedResult): void
261252
{
262253
$reflection = new ReflectionObject($this->cache);
263254
$method = $reflection->getMethod('normalizeTtl');
@@ -281,54 +272,44 @@ public function invalidKeyProvider(): array
281272

282273
/**
283274
* @dataProvider invalidKeyProvider
284-
*
285-
* @param mixed $key
286275
*/
287-
public function testGetThrowExceptionForInvalidKey($key): void
276+
public function testGetThrowExceptionForInvalidKey(mixed $key): void
288277
{
289278
$this->expectException(InvalidArgumentException::class);
290279
$this->cache->get($key);
291280
}
292281

293282
/**
294283
* @dataProvider invalidKeyProvider
295-
*
296-
* @param mixed $key
297284
*/
298-
public function testHasThrowExceptionForInvalidKey($key): void
285+
public function testHasThrowExceptionForInvalidKey(mixed $key): void
299286
{
300287
$this->expectException(InvalidArgumentException::class);
301288
$this->cache->has($key);
302289
}
303290

304291
/**
305292
* @dataProvider invalidKeyProvider
306-
*
307-
* @param mixed $key
308293
*/
309-
public function testDeleteThrowExceptionForInvalidKey($key): void
294+
public function testDeleteThrowExceptionForInvalidKey(mixed $key): void
310295
{
311296
$this->expectException(InvalidArgumentException::class);
312297
$this->cache->delete($key);
313298
}
314299

315300
/**
316301
* @dataProvider invalidKeyProvider
317-
*
318-
* @param mixed $key
319302
*/
320-
public function testGetMultipleThrowExceptionForInvalidKeys($key): void
303+
public function testGetMultipleThrowExceptionForInvalidKeys(mixed $key): void
321304
{
322305
$this->expectException(InvalidArgumentException::class);
323306
$this->cache->getMultiple([$key]);
324307
}
325308

326309
/**
327310
* @dataProvider invalidKeyProvider
328-
*
329-
* @param mixed $key
330311
*/
331-
public function testDeleteMultipleThrowExceptionForInvalidKeys($key): void
312+
public function testDeleteMultipleThrowExceptionForInvalidKeys(mixed $key): void
332313
{
333314
$this->expectException(InvalidArgumentException::class);
334315
$this->cache->deleteMultiple([$key]);
@@ -353,8 +334,6 @@ public function testSetMultipleThrowExceptionForEmptyArray(): void
353334
}
354335

355336
/**
356-
* @param array $values
357-
*
358337
* @return array
359338
*/
360339
private function prepareKeysOfValues(array $values): array
@@ -377,10 +356,6 @@ private function getDataProviderData(): array
377356
return $data;
378357
}
379358

380-
/**
381-
* @param mixed $expected
382-
* @param mixed $actual
383-
*/
384359
private function assertSameExceptObject(mixed $expected, mixed $actual): void
385360
{
386361
// Assert for all types.
@@ -443,9 +418,6 @@ public function getIterator(): ArrayIterator
443418
/**
444419
* @dataProvider iterableProvider
445420
*
446-
* @param array $array
447-
* @param iterable $iterable
448-
*
449421
* @throws InvalidArgumentException
450422
*/
451423
public function testValuesAsIterable(array $array, iterable $iterable): void

tests/docker/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
args:
1111
PHP_VERSION: ${PHP_VERSION:-8.1}
1212
volumes:
13-
- ../runtime/.composer80:/root/.composer
13+
- ../runtime/.composer:/root/.composer
1414
- ../..:/var/www
1515
networks: &network
1616
- cache-redis-network

0 commit comments

Comments
 (0)