From f94a41c150efaffd6f4c23ef95e31cae7a83704f Mon Sep 17 00:00:00 2001 From: Reyo Stallenberg Date: Fri, 9 Aug 2024 09:04:30 +0200 Subject: [PATCH] fix: mismatch in classname for cache discovery (#6) See #5 --------- Co-authored-by: Evan Sims --- src/Discover.php | 2 +- src/Exceptions/SupportPackageNotFoundException.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Discover.php b/src/Discover.php index 77323f8..3bca5a8 100644 --- a/src/Discover.php +++ b/src/Discover.php @@ -87,7 +87,7 @@ final class Discover implements DiscoverContract public static function cache(bool $singleton = false): ?object { - $implementationsPackage = '\PsrDiscovery\Implementations\Psr6\Cache'; + $implementationsPackage = '\PsrDiscovery\Implementations\Psr6\Caches'; if (! class_exists($implementationsPackage)) { throw new SupportPackageNotFoundException('PSR-6 Cache', 'psr-discovery/cache-implementations'); diff --git a/src/Exceptions/SupportPackageNotFoundException.php b/src/Exceptions/SupportPackageNotFoundException.php index a6a70c4..b240747 100644 --- a/src/Exceptions/SupportPackageNotFoundException.php +++ b/src/Exceptions/SupportPackageNotFoundException.php @@ -6,6 +6,8 @@ use Exception; +use function sprintf; + final class SupportPackageNotFoundException extends Exception { /**