From 4f305461953e0010d39054bb2cf9f560009ec4ff Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Wed, 11 Feb 2026 10:09:59 +0900 Subject: [PATCH 1/2] Move qualifier attributes from method-level to parameter-level Method-level #[CacheDir] and #[CacheNamespace] attributes on the constructor were not resolved by Ray.Di, which only processes parameter-level attributes. This caused the cache directory to always fall back to sys_get_temp_dir() instead of using the bound CacheDir value. --- src/LocalCacheProvider.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/LocalCacheProvider.php b/src/LocalCacheProvider.php index 3f29a1d..e8acdba 100644 --- a/src/LocalCacheProvider.php +++ b/src/LocalCacheProvider.php @@ -22,10 +22,12 @@ { private string $cacheDir; - #[CacheDir('cacheDir')] - #[CacheNamespace('namespace')] - public function __construct(string $cacheDir = '', private string $namespace = '') - { + public function __construct( + #[CacheDir] + string $cacheDir = '', + #[CacheNamespace] + private string $namespace = '', + ) { $this->cacheDir = $cacheDir ?: sys_get_temp_dir(); } From 3a3a5669863134ef835fa2ed9346b8873ee4f4e3 Mon Sep 17 00:00:00 2001 From: Akihito Koriyama Date: Sat, 25 Apr 2026 20:21:42 +0900 Subject: [PATCH 2/2] Remove unused koriym/attributes dependency from test bootstrap The bootstrap was setting up a Doctrine annotation reader via the deprecated Ray\ServiceLocator\ServiceLocator. This is no longer needed since the package uses native PHP 8 attributes. The koriym/attributes package is not declared in composer.json, causing CI to fail with "Class Koriym\Attributes\AttributeReader not found". --- tests/bootstrap.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 9d90486..174d7fd 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,10 +1,3 @@ = 8) { - ServiceLocator::setReader(new AttributeReader()); -}