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: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"phpunit/phpunit": "^10.5",
"symfony/var-dumper": "~6.4",
"friendsofphp/php-cs-fixer": "~3.3",
"cache/integration-tests": "dev-master"
"cache/integration-tests": "dev-master",
"phpstan/phpstan": "^2.1"
},
"suggest": {
"ext-redis": "^5.3"
Expand Down
2 changes: 1 addition & 1 deletion src/CacheEntryPool/CacheEntryPool.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function clear(): bool
$this->cache->delete($this->poolName);
unset($this->deferredItems);
$this->deferredItems = [];
} catch (Exception $e) {
} catch (\Exception $e) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion src/RedisEnhancedCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ public function deleteFromPool(array $keys, string $pool = self::DEFAULT_POOL):

try {
$redisResponse = call_user_func_array([$this->getRedis(), 'hdel'], $params);
} catch (Exception $e) {
} catch (\Exception $e) {
$redisResponse = false;
$this->formatException($e);
}
Expand Down
2 changes: 2 additions & 0 deletions tests/Integration/CacheIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
use Cache\IntegrationTests\SimpleCacheTest;
use LLegaz\Cache\RedisCache as SUT;
use LLegaz\Cache\Tests\TestState;
use PHPUnit\Framework\Attributes\Before;
use PHPUnit\Framework\Attributes\DataProvider;
use Psr\SimpleCache\CacheInterface;
use TypeError;

Expand Down
2 changes: 2 additions & 0 deletions tests/Integration/CacheIntegrationWithPCTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
use Cache\IntegrationTests\SimpleCacheTest;
use LLegaz\Cache\RedisCache as SUT;
use LLegaz\Cache\Tests\TestState;
use PHPUnit\Framework\Attributes\Before;
use PHPUnit\Framework\Attributes\DataProvider;
use Psr\SimpleCache\CacheInterface;
use TypeError;

Expand Down
1 change: 1 addition & 0 deletions tests/Integration/PoolIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use LLegaz\Cache\Pool\CacheEntryPool as SUT;
use LLegaz\Cache\RedisEnhancedCache;
use LLegaz\Cache\Tests\TestState;
use PHPUnit\Framework\Attributes\Before;
use Psr\Cache\CacheItemPoolInterface;

if (!defined('SKIP_INTEGRATION_TESTS')) {
Expand Down
1 change: 1 addition & 0 deletions tests/Integration/PoolIntegrationWithPCTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use LLegaz\Cache\Pool\CacheEntryPool as SUT;
use LLegaz\Cache\RedisEnhancedCache;
use LLegaz\Cache\Tests\TestState;
use PHPUnit\Framework\Attributes\Before;
use Psr\Cache\CacheItemPoolInterface;

if (!defined('SKIP_INTEGRATION_TESTS')) {
Expand Down