Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DeclarationLocator to use Tokenizer cache #87

Merged
merged 3 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
1 change: 1 addition & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</ignoreFiles>
</projectFiles>
<issueHandlers>
<MissingClassConstType errorLevel="suppress" />
<DeprecatedInterface>
<errorLevel type="suppress">
<file name="src/Commands/InfoCommand.php"/>
Expand Down
4 changes: 2 additions & 2 deletions src/DeclarationLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion src/DeclarationRegistryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Loading