From b4ff61ad96bce95dd46e77a9a95bf19371e7da47 Mon Sep 17 00:00:00 2001 From: flashwave Date: Wed, 16 Oct 2024 01:26:08 +0000 Subject: [PATCH] Removed ability to use class paths as Cache DSN protocols. --- VERSION | 2 +- src/Cache/CacheTools.php | 26 ++++++++------------------ tests/CacheToolsTest.php | 5 +---- 3 files changed, 10 insertions(+), 23 deletions(-) diff --git a/VERSION b/VERSION index e33fc78..dd1b5b7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.2410.160117 +0.2410.160124 diff --git a/src/Cache/CacheTools.php b/src/Cache/CacheTools.php index 727e490..1c2f472 100644 --- a/src/Cache/CacheTools.php +++ b/src/Cache/CacheTools.php @@ -1,7 +1,7 @@ isAvailable()) throw new RuntimeException('Requested cache backend is not available, likely due to missing dependencies.'); - $backends[$name] = $backend; + $backends[$scheme] = $backend; } return $backend; diff --git a/tests/CacheToolsTest.php b/tests/CacheToolsTest.php index 714c947..c19afe8 100644 --- a/tests/CacheToolsTest.php +++ b/tests/CacheToolsTest.php @@ -1,7 +1,7 @@ assertInstanceOf(ArrayCacheProvider::class, $arrayCache); - - $arrayCache = CacheTools::create('Index-Cache-ArrayCache-ArrayCacheBackend:'); - $this->assertInstanceOf(ArrayCacheProvider::class, $arrayCache); } public function testMemcachedDSN(): void {