From 5678a58de8342b28d7ec39f2d4e187aba9d2b861 Mon Sep 17 00:00:00 2001 From: "A. B. M. Mahmudul Hasan" Date: Sat, 18 Jul 2026 09:30:18 +0600 Subject: [PATCH] updated std --- .github/workflows/security-standards.yml | 1 + src/Cache/Adapter/ApcuCacheAdapter.php | 2 +- src/Memoize/OnceMemoizer.php | 4 ---- tests/Cache/ApcuCachePoolTest.php | 2 ++ tests/Cache/ArrayCachePoolTest.php | 2 ++ tests/Cache/CacheFeaturesTest.php | 2 ++ tests/Cache/CachePayloadCodecSecurityTest.php | 2 ++ tests/Cache/ChainCachePoolTest.php | 2 ++ tests/Cache/FileCachePoolTest.php | 2 ++ tests/Cache/MemCachePoolTest.php | 2 ++ tests/Cache/MongoDbCachePoolTest.php | 2 ++ tests/Cache/NullCachePoolTest.php | 2 ++ tests/Cache/PdoCachePoolTest.php | 2 ++ tests/Cache/PdoMysqlCachePoolTest.php | 2 ++ tests/Cache/PdoPgsqlCachePoolTest.php | 2 ++ tests/Cache/PhpFilesCachePoolTest.php | 2 ++ tests/Cache/RedisCachePoolTest.php | 2 ++ tests/Cache/RedisClusterCachePoolTest.php | 2 ++ tests/Cache/ScyllaDbCachePoolTest.php | 2 ++ tests/Cache/SharedMemoryCachePoolTest.php | 2 ++ tests/Cache/SqliteCachePoolTest.php | 2 ++ tests/Cache/ValkeyCachePoolTest.php | 2 ++ tests/Cache/WeakMapCachePoolTest.php | 2 ++ tests/Cluster/ClusterCacheTest.php | 2 ++ tests/Memoize/MemoizeTest.php | 2 ++ tests/Memoize/OnceMemoizerTest.php | 2 ++ tests/Node/NodeCacheTest.php | 2 ++ tests/Serializer/ValueSerializerTest.php | 2 ++ 28 files changed, 52 insertions(+), 5 deletions(-) diff --git a/.github/workflows/security-standards.yml b/.github/workflows/security-standards.yml index 61b240c..445cd42 100644 --- a/.github/workflows/security-standards.yml +++ b/.github/workflows/security-standards.yml @@ -31,6 +31,7 @@ jobs: enable_postgres_service: true enable_mysql_service: true enable_scylladb_service: true + enable_elasticsearch_service: false enable_mongodb_service: true service_db_name: "cachelayer" service_db_user: "cachelayer" diff --git a/src/Cache/Adapter/ApcuCacheAdapter.php b/src/Cache/Adapter/ApcuCacheAdapter.php index cb3fece..fe3685d 100644 --- a/src/Cache/Adapter/ApcuCacheAdapter.php +++ b/src/Cache/Adapter/ApcuCacheAdapter.php @@ -169,7 +169,7 @@ protected function supportsItem(CacheItemInterface $item): bool private function appendFetchedHit(array &$items, array &$stale, string $key, array $raw): bool { $mapped = $this->map($key); - if (!array_key_exists($mapped, $raw) || !is_string($raw[$mapped])) { + if (!isset($raw[$mapped]) || !is_string($raw[$mapped])) { return false; } diff --git a/src/Memoize/OnceMemoizer.php b/src/Memoize/OnceMemoizer.php index bed544f..d3ef410 100644 --- a/src/Memoize/OnceMemoizer.php +++ b/src/Memoize/OnceMemoizer.php @@ -117,10 +117,6 @@ private function normalizeCallerFunction(string $callerFunction): string private function trackCacheKey(string $key): void { - if (in_array($key, $this->order, true)) { - return; - } - $this->order[] = $key; if (count($this->order) <= self::LIMIT) { return; diff --git a/tests/Cache/ApcuCachePoolTest.php b/tests/Cache/ApcuCachePoolTest.php index a00c4f9..93f2954 100644 --- a/tests/Cache/ApcuCachePoolTest.php +++ b/tests/Cache/ApcuCachePoolTest.php @@ -1,5 +1,7 @@