Skip to content
Open
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
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@
*.webp binary
*.bmp binary
*.ttf binary
*.blp binary
*.db2 binary

# Ignoring files for distribution archieves
.github/ export-ignore
etc/ci/ export-ignore
etc/dev-app/ export-ignore
etc/qa/ export-ignore
examples/ export-ignore
tests/ export-ignore
Expand Down
12 changes: 8 additions & 4 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>WyriHaximus/renovate-config:php-package"
]
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>WyriHaximus/renovate-config:php-package"
],
"constraints": {
"php": "8.4.x",
"composer": "2.x"
}
}
109 changes: 80 additions & 29 deletions Makefile

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"react/promise": "^3.2"
},
"require-dev": {
"wyrihaximus/async-test-utilities": "^12.0.0",
"wyrihaximus/makefiles": "^0.7.15"
"wyrihaximus/async-test-utilities": "^12.2.0",
"wyrihaximus/makefiles": "^0.10.4"
},
"autoload": {
"psr-4": {
Expand Down
515 changes: 261 additions & 254 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion etc/qa/infection.json5
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"timeout": 120,
"source": {
"directories": [
"src"
"../../src"
]
},
"logs": {
Expand Down
58 changes: 12 additions & 46 deletions src/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,69 +24,52 @@
private const string DEFAULT_PREFIX = 'react:cache:';
private const int DEFAULT_TTL = 0;

/** @phpstan-ignore-next-line */
public function __construct(private Client $client, private string $prefix = self::DEFAULT_PREFIX, private int $ttl = self::DEFAULT_TTL)

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with highest dependency preference

Unused WyriHaximus\React\Cache\Redis::__construct (all usages excluded by tests excluder)

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with highest dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $ttl with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with highest dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $prefix with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with lowest dependency preference

Unused WyriHaximus\React\Cache\Redis::__construct (all usages excluded by tests excluder)

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with lowest dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $ttl with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with lowest dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $prefix with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with lowest dependency preference

Unused WyriHaximus\React\Cache\Redis::__construct (all usages excluded by tests excluder)

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with lowest dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $ttl with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with lowest dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $prefix with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with locked dependency preference

Unused WyriHaximus\React\Cache\Redis::__construct (all usages excluded by tests excluder)

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with locked dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $ttl with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with locked dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $prefix with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with lowest dependency preference

Unused WyriHaximus\React\Cache\Redis::__construct (all usages excluded by tests excluder)

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with lowest dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $ttl with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with lowest dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $prefix with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with lowest dependency preference

Unused WyriHaximus\React\Cache\Redis::__construct (all usages excluded by tests excluder)

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with lowest dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $ttl with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with lowest dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $prefix with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with highest dependency preference

Unused WyriHaximus\React\Cache\Redis::__construct (all usages excluded by tests excluder)

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with highest dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $ttl with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with highest dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $prefix with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with locked dependency preference

Unused WyriHaximus\React\Cache\Redis::__construct (all usages excluded by tests excluder)

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with locked dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $ttl with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with locked dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $prefix with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with locked dependency preference

Unused WyriHaximus\React\Cache\Redis::__construct (all usages excluded by tests excluder)

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with locked dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $ttl with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with locked dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $prefix with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with locked dependency preference

Unused WyriHaximus\React\Cache\Redis::__construct (all usages excluded by tests excluder)

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with locked dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $ttl with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with locked dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $prefix with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with highest dependency preference

Unused WyriHaximus\React\Cache\Redis::__construct (all usages excluded by tests excluder)

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with highest dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $ttl with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with highest dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $prefix with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with highest dependency preference

Unused WyriHaximus\React\Cache\Redis::__construct (all usages excluded by tests excluder)

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with highest dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $ttl with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with highest dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $prefix with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with lowest dependency preference

Unused WyriHaximus\React\Cache\Redis::__construct (all usages excluded by tests excluder)

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with lowest dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $ttl with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with lowest dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $prefix with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with locked dependency preference

Unused WyriHaximus\React\Cache\Redis::__construct (all usages excluded by tests excluder)

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with locked dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $ttl with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with locked dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $prefix with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with highest dependency preference

Unused WyriHaximus\React\Cache\Redis::__construct (all usages excluded by tests excluder)

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with highest dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $ttl with default value.

Check failure on line 27 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with highest dependency preference

Constructor in WyriHaximus\React\Cache\Redis has parameter $prefix with default value.
{
}

/**
* @inheritDoc
* @phpstan-ignore-next-line
*/
/** @inheritDoc */
public function get($key, $default = null): PromiseInterface

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with highest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with highest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with highest dependency preference

Method WyriHaximus\React\Cache\Redis::get() has parameter $default with null as default value.

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with lowest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with lowest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with lowest dependency preference

Method WyriHaximus\React\Cache\Redis::get() has parameter $default with null as default value.

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with lowest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with lowest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with lowest dependency preference

Method WyriHaximus\React\Cache\Redis::get() has parameter $default with null as default value.

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with locked dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with locked dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with locked dependency preference

Method WyriHaximus\React\Cache\Redis::get() has parameter $default with null as default value.

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with lowest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with lowest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with lowest dependency preference

Method WyriHaximus\React\Cache\Redis::get() has parameter $default with null as default value.

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with lowest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with lowest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with lowest dependency preference

Method WyriHaximus\React\Cache\Redis::get() has parameter $default with null as default value.

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with highest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with highest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with highest dependency preference

Method WyriHaximus\React\Cache\Redis::get() has parameter $default with null as default value.

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with locked dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with locked dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with locked dependency preference

Method WyriHaximus\React\Cache\Redis::get() has parameter $default with null as default value.

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with locked dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with locked dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with locked dependency preference

Method WyriHaximus\React\Cache\Redis::get() has parameter $default with null as default value.

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with locked dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with locked dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with locked dependency preference

Method WyriHaximus\React\Cache\Redis::get() has parameter $default with null as default value.

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with highest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with highest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with highest dependency preference

Method WyriHaximus\React\Cache\Redis::get() has parameter $default with null as default value.

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with highest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with highest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with highest dependency preference

Method WyriHaximus\React\Cache\Redis::get() has parameter $default with null as default value.

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with lowest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with lowest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with lowest dependency preference

Method WyriHaximus\React\Cache\Redis::get() has parameter $default with null as default value.

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with locked dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with locked dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with locked dependency preference

Method WyriHaximus\React\Cache\Redis::get() has parameter $default with null as default value.

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with highest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with highest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 32 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with highest dependency preference

Method WyriHaximus\React\Cache\Redis::get() has parameter $default with null as default value.
{
return $this->has($key)->then(function (mixed $result) use ($key): PromiseInterface {
if ($result === false) {
return resolve(null);
}

/** @phpstan-ignore-next-line */
return $this->client->get($this->prefix . $key);

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with highest dependency preference

Call to an undefined method Clue\React\Redis\Client::get().

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with highest dependency preference

Anonymous function should return React\Promise\PromiseInterface but returns mixed.

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with lowest dependency preference

Call to an undefined method Clue\React\Redis\Client::get().

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with lowest dependency preference

Anonymous function should return React\Promise\PromiseInterface but returns mixed.

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with lowest dependency preference

Call to an undefined method Clue\React\Redis\Client::get().

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with lowest dependency preference

Anonymous function should return React\Promise\PromiseInterface but returns mixed.

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with locked dependency preference

Call to an undefined method Clue\React\Redis\Client::get().

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with locked dependency preference

Anonymous function should return React\Promise\PromiseInterface but returns mixed.

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with lowest dependency preference

Call to an undefined method Clue\React\Redis\Client::get().

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with lowest dependency preference

Anonymous function should return React\Promise\PromiseInterface but returns mixed.

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with lowest dependency preference

Call to an undefined method Clue\React\Redis\Client::get().

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with lowest dependency preference

Anonymous function should return React\Promise\PromiseInterface but returns mixed.

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with highest dependency preference

Call to an undefined method Clue\React\Redis\Client::get().

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with highest dependency preference

Anonymous function should return React\Promise\PromiseInterface but returns mixed.

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with locked dependency preference

Call to an undefined method Clue\React\Redis\Client::get().

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with locked dependency preference

Anonymous function should return React\Promise\PromiseInterface but returns mixed.

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with locked dependency preference

Call to an undefined method Clue\React\Redis\Client::get().

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with locked dependency preference

Anonymous function should return React\Promise\PromiseInterface but returns mixed.

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with locked dependency preference

Call to an undefined method Clue\React\Redis\Client::get().

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with locked dependency preference

Anonymous function should return React\Promise\PromiseInterface but returns mixed.

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with highest dependency preference

Call to an undefined method Clue\React\Redis\Client::get().

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with highest dependency preference

Anonymous function should return React\Promise\PromiseInterface but returns mixed.

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with highest dependency preference

Call to an undefined method Clue\React\Redis\Client::get().

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with highest dependency preference

Anonymous function should return React\Promise\PromiseInterface but returns mixed.

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with lowest dependency preference

Call to an undefined method Clue\React\Redis\Client::get().

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with lowest dependency preference

Anonymous function should return React\Promise\PromiseInterface but returns mixed.

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with locked dependency preference

Call to an undefined method Clue\React\Redis\Client::get().

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with locked dependency preference

Anonymous function should return React\Promise\PromiseInterface but returns mixed.

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with highest dependency preference

Call to an undefined method Clue\React\Redis\Client::get().

Check failure on line 39 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with highest dependency preference

Anonymous function should return React\Promise\PromiseInterface but returns mixed.
});
}

/**
* @inheritDoc
* @phpstan-ignore-next-line
*/
/** @inheritDoc */
public function set($key, $value, $ttl = null): PromiseInterface

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with highest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with highest dependency preference

Method WyriHaximus\React\Cache\Redis::set() has parameter $ttl with null as default value.

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with lowest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with lowest dependency preference

Method WyriHaximus\React\Cache\Redis::set() has parameter $ttl with null as default value.

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with lowest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with lowest dependency preference

Method WyriHaximus\React\Cache\Redis::set() has parameter $ttl with null as default value.

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with locked dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with locked dependency preference

Method WyriHaximus\React\Cache\Redis::set() has parameter $ttl with null as default value.

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with lowest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with lowest dependency preference

Method WyriHaximus\React\Cache\Redis::set() has parameter $ttl with null as default value.

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with lowest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with lowest dependency preference

Method WyriHaximus\React\Cache\Redis::set() has parameter $ttl with null as default value.

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with highest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (nts) with highest dependency preference

Method WyriHaximus\React\Cache\Redis::set() has parameter $ttl with null as default value.

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with locked dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with locked dependency preference

Method WyriHaximus\React\Cache\Redis::set() has parameter $ttl with null as default value.

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with locked dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with locked dependency preference

Method WyriHaximus\React\Cache\Redis::set() has parameter $ttl with null as default value.

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with locked dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with locked dependency preference

Method WyriHaximus\React\Cache\Redis::set() has parameter $ttl with null as default value.

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with highest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (nts) with highest dependency preference

Method WyriHaximus\React\Cache\Redis::set() has parameter $ttl with null as default value.

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with highest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with highest dependency preference

Method WyriHaximus\React\Cache\Redis::set() has parameter $ttl with null as default value.

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with lowest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with lowest dependency preference

Method WyriHaximus\React\Cache\Redis::set() has parameter $ttl with null as default value.

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with locked dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.5 (zts) with locked dependency preference

Method WyriHaximus\React\Cache\Redis::set() has parameter $ttl with null as default value.

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with highest dependency preference

Out of 23 possible param types, only 12 - 52.1 % actually have it. Add more param types to get over 100 %

Check failure on line 44 in src/Redis.php

View workflow job for this annotation

GitHub Actions / Continuous Integration / Continuous Integration / Run stan on PHP 8.4 (zts) with highest dependency preference

Method WyriHaximus\React\Cache\Redis::set() has parameter $ttl with null as default value.
{
if ($this->ttl === 0 && $ttl === null) {
/** @phpstan-ignore-next-line */
return $this->client->set($this->prefix . $key, (string) $value)->then(
static fn (): PromiseInterface => resolve(true),
static fn (): PromiseInterface => resolve(false),
);
}

/** @phpstan-ignore-next-line */
return $this->client->psetex(
$this->prefix . $key,
(string) ((float) ($this->ttl > 0 ? $this->ttl : $ttl) * 1000),
(string) $value, /** @phpstan-ignore-line */
(string) $value,
)->then(
static fn (): PromiseInterface => resolve(true),
static fn (): PromiseInterface => resolve(false),
);
}

/**
* @inheritDoc
* @phpstan-ignore-next-line
*/
/** @inheritDoc */
public function delete($key): PromiseInterface
{
/** @phpstan-ignore-next-line */
return $this->client->del($this->prefix . $key)->then(
static fn (): PromiseInterface => resolve(true),
static fn (): PromiseInterface => resolve(false),
);
}

/**
* @inheritDoc
* @phpstan-ignore-next-line
*/
/** @inheritDoc */
public function getMultiple(array $keys, $default = null)
{
$promises = [];
Expand All @@ -97,10 +80,7 @@
return all($promises);
}

/**
* @inheritDoc
* @phpstan-ignore-next-line
*/
/** @inheritDoc */
public function setMultiple(array $values, $ttl = null)
{
$promises = [];
Expand All @@ -112,37 +92,27 @@
return all($promises)->then(static fn (array $bools): bool => array_all($bools, static fn (bool $bool): bool => $bool));
}

/**
* @inheritDoc
* @phpstan-ignore-next-line
*/
/** @inheritDoc */
public function deleteMultiple(array $keys)
{
foreach ($keys as $index => $key) {
$keys[$index] = $this->prefix . $key;
}

return $this->client->del(...$keys)->then( /** @phpstan-ignore-line */
return $this->client->del(...$keys)->then(
static fn (): PromiseInterface => resolve(true),
static fn (): PromiseInterface => resolve(false),
);
}

/**
* @inheritDoc
* @phpstan-ignore-next-line
*/
/** @inheritDoc */
public function clear()
{
return $this->client->keys($this->prefix . '*')->then( /** @phpstan-ignore-line */
return $this->client->keys($this->prefix . '*')->then(
function (array $keys): PromiseInterface {
/**
* @var array<string> $matchedKeys
* @phpstan-ignore-next-line
*/
/** @var array<string> $matchedKeys */
$matchedKeys = preg_replace('|^' . preg_quote($this->prefix) . '|', '', $keys);
if (preg_last_error() !== PREG_NO_ERROR) {
/** @phpstan-ignore-next-line */
throw new RuntimeException(preg_last_error_msg());
}

Expand All @@ -151,13 +121,9 @@
);
}

/**
* @inheritDoc
* @phpstan-ignore-next-line
*/
/** @inheritDoc */
public function has($key)
{
/** @phpstan-ignore-next-line */
return $this->client->exists($this->prefix . $key);
}
}
3 changes: 0 additions & 3 deletions tests/ClientStub.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@

use function React\Promise\resolve;

/** @phpstan-ignore-next-line */
class ClientStub implements Client
{
use EventEmitterTrait;

/** @phpstan-ignore-next-line */
public function __call($name, $args) //phpcs:disabled
{
return resolve(null);
Expand Down Expand Up @@ -80,7 +78,6 @@ public function keys(string $keys): PromiseInterface
}

/**
* @phpstan-ignore-next-line
*/
public function isBusy(): bool //phpcs:disabled
{
Expand Down
2 changes: 1 addition & 1 deletion tests/RedisTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public function setMultiple(): void
$value = 'value';
$ttl = 123;
$client->expects('psetex')->with($prefix . $key, $ttl * 1000, $value)->once()->andReturn(resolve(true));
self::assertSame(true, await(new Redis($client, $prefix)->setMultiple([$key => $value], $ttl))); /** @phpstan-ignore-line */
self::assertSame(true, await(new Redis($client, $prefix)->setMultiple([$key => $value], $ttl)));
}

#[Test]
Expand Down
Loading