From 3436b2501dd5cb8b39e4c49ecb88e5f4f28654b7 Mon Sep 17 00:00:00 2001 From: Tom Wright Date: Thu, 25 Apr 2024 17:51:34 +0000 Subject: [PATCH 1/3] Updated readme Signed-off-by: Tom Wright --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 94140a3..ae55e38 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,6 @@ By default, newly loaded caches use a generic Store implementation, however if y namespace MyApp; use DecodeLabs\Archetype; -use DecodeLabs\Archetype\Resolver\Extension as ArchetypeExtension; use DecodeLabs\Stash\Store; use DecodeLabs\Stash\Store\Generic; @@ -147,9 +146,9 @@ class MyCache extends Generic } } -Archetype::register(new ArchetypeExtension( - Store::class, namespace::class -)) +Archetype::extend(Store::class, namespace::class); + +$myCache = Stash::load('MyCache'); // Will now use MyApp\MyCache ``` From d84562915477cf6367b7288f9affb059e3735d3a Mon Sep 17 00:00:00 2001 From: Tom Wright Date: Fri, 26 Apr 2024 18:00:30 +0000 Subject: [PATCH 2/3] Updated Archetype dependency Signed-off-by: Tom Wright --- CHANGELOG.md | 2 ++ README.md | 2 +- composer.json | 2 +- src/Stash/Driver/Redis.php | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1011e8..004695a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Updated Archetype dependency + ## v0.5.4 (2024-04-24) * Updated Carbon dependency diff --git a/README.md b/README.md index ae55e38..f9a4134 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ class MyCache extends Generic } } -Archetype::extend(Store::class, namespace::class); +Archetype::map(Store::class, namespace::class); $myCache = Stash::load('MyCache'); // Will now use MyApp\MyCache ``` diff --git a/composer.json b/composer.json index 2d04cf1..48981a6 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ "require": { "php": "^8.1", - "decodelabs/archetype": "^0.2.6", + "decodelabs/archetype": "^0.3", "decodelabs/atlas": "^0.11.1", "decodelabs/coercion": "^0.2.6", "decodelabs/dictum": "^0.6.0", diff --git a/src/Stash/Driver/Redis.php b/src/Stash/Driver/Redis.php index b911655..6a68f2f 100644 --- a/src/Stash/Driver/Redis.php +++ b/src/Stash/Driver/Redis.php @@ -213,7 +213,7 @@ public function getKeys(string $namespace): array protected function getPathIndex( string $pathKey ): int { - return (int)$this->client->get($pathKey); + return Coercion::toInt($this->client->get($pathKey)); } From 28590ea2d4aaf1080c48fbe2da8a2c19738084e9 Mon Sep 17 00:00:00 2001 From: Tom Wright Date: Fri, 26 Apr 2024 18:01:04 +0000 Subject: [PATCH 3/3] Updated changelog Signed-off-by: Tom Wright --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 004695a..ab9516b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## v0.5.5 (2024-04-26) * Updated Archetype dependency ## v0.5.4 (2024-04-24)