From a32dfea0475f23ac5db2163b11e37e34cfa92e3a Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Wed, 22 May 2024 22:49:04 +0400 Subject: [PATCH 1/3] Update dependencies; fix DeclarationLocator to use TokenizerCache --- composer.json | 14 +++++++------- src/DeclarationLocator.php | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 1104a89..eb13b61 100644 --- a/composer.json +++ b/composer.json @@ -37,17 +37,17 @@ ], "require": { "php": "^8.1", - "spiral/boot": "^3.0", + "spiral/boot": "^3.13", "spiral/attributes": "^2.8 || ^3.0", - "spiral/tokenizer": "^3.0", - "spiral/scaffolder": "^3.0", - "spiral/roadrunner-bridge": "^2.0 || ^3.0", + "spiral/tokenizer": "^3.13", + "spiral/scaffolder": "^3.13", + "spiral/roadrunner-bridge": "^2.0 || ^3.5", "temporal/sdk": "^2.7" }, "require-dev": { - "spiral/framework": "^3.0", - "spiral/testing": "^2.6", - "vimeo/psalm": "^5.17" + "spiral/framework": "^3.13", + "spiral/testing": "^2.7", + "vimeo/psalm": "^5.23" }, "autoload": { "psr-4": { diff --git a/src/DeclarationLocator.php b/src/DeclarationLocator.php index 7c5cff9..d377ac3 100644 --- a/src/DeclarationLocator.php +++ b/src/DeclarationLocator.php @@ -14,8 +14,8 @@ use Temporal\Workflow\WorkflowInterface; #[Singleton] -// #[TargetAttribute(WorkflowInterface::class)] -// #[TargetAttribute(ActivityInterface::class)] +#[TargetAttribute(WorkflowInterface::class, scanParents: true)] +#[TargetAttribute(ActivityInterface::class, scanParents: true)] final class DeclarationLocator implements DeclarationRegistryInterface, TokenizationListenerInterface, From 622c1aa15cf59b340b8c31755936ab2bc6cc39bc Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Wed, 22 May 2024 22:52:39 +0400 Subject: [PATCH 2/3] Fix parameter type in DeclarationRegistryInterface::addDeclaration --- src/DeclarationRegistryInterface.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DeclarationRegistryInterface.php b/src/DeclarationRegistryInterface.php index 21803b0..d124a33 100644 --- a/src/DeclarationRegistryInterface.php +++ b/src/DeclarationRegistryInterface.php @@ -11,7 +11,8 @@ interface DeclarationRegistryInterface /** * Add a new declaration to the registry. * - * @param \ReflectionClass|class-string $class Workflow or activity class name or reflection. + * @param DeclarationDto|\ReflectionClass|class-string $class Workflow or activity class name or reflection + * or full declaration dto. */ public function addDeclaration(DeclarationDto|\ReflectionClass|string $class): void; From 2c9ca285edc20163d4afe04778a964ee7f30d6af Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Wed, 22 May 2024 22:57:11 +0400 Subject: [PATCH 3/3] Suppress MissingClassConstType in psalm.xml --- psalm.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/psalm.xml b/psalm.xml index c695981..96c248e 100644 --- a/psalm.xml +++ b/psalm.xml @@ -14,6 +14,7 @@ +