File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 2020use Temporal \Internal \Declaration \Prototype \WorkflowPrototype ;
2121use Temporal \Internal \Declaration \WorkflowInstance \SignalQueue ;
2222use Temporal \Internal \Interceptor ;
23- use Temporal \Workflow \InitMethod ;
23+ use Temporal \Workflow \WorkflowInit ;
2424
2525/**
2626 * @psalm-type QueryHandler = \Closure(QueryInput): mixed
@@ -155,7 +155,7 @@ public function init(array $arguments = []): void
155155
156156 // Check InitMethod attribute
157157 $ reflection = new \ReflectionMethod ($ this ->context , '__construct ' );
158- $ attributes = $ reflection ->getAttributes (InitMethod ::class);
158+ $ attributes = $ reflection ->getAttributes (WorkflowInit ::class);
159159 $ attributes === []
160160 ? $ this ->context ->__construct ()
161161 : $ this ->context ->__construct (...$ arguments );
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ interface WorkflowInstanceInterface extends InstanceInterface
2525{
2626 /**
2727 * Trigger constructor in Process context.
28- * If the constructor is tagged with {@see \Temporal\Workflow\InitMethod } attribute,
28+ * If the constructor is tagged with {@see \Temporal\Workflow\WorkflowInit } attribute,
2929 * it will be executed with the {@see \Temporal\Workflow\WorkflowMethod} arguments.
3030 */
3131 public function init (array $ arguments = []): void ;
Original file line number Diff line number Diff line change 2121 * @Target({ "METHOD" })
2222 */
2323#[\Attribute(\Attribute::TARGET_METHOD )]
24- final class InitMethod {}
24+ final class WorkflowInit {}
Original file line number Diff line number Diff line change 1010use Temporal \Exception \Failure \TimeoutFailure ;
1111use Temporal \Tests \Acceptance \App \Attribute \Stub ;
1212use Temporal \Tests \Acceptance \App \TestCase ;
13- use Temporal \Workflow \InitMethod ;
13+ use Temporal \Workflow \WorkflowInit ;
1414use Temporal \Workflow \WorkflowInterface ;
1515use Temporal \Workflow \WorkflowMethod ;
1616
@@ -57,7 +57,7 @@ class TestWorkflow
5757{
5858 private array $ initInput ;
5959
60- #[InitMethod ]
60+ #[WorkflowInit ]
6161 public function __construct (Input $ input )
6262 {
6363 $ this ->initInput = \func_get_args ();
@@ -75,7 +75,7 @@ class TestWorkflowEmptyConstructor
7575{
7676 private array $ initInput ;
7777
78- #[InitMethod ]
78+ #[WorkflowInit ]
7979 public function __construct ()
8080 {
8181 $ this ->initInput = \func_get_args ();
@@ -93,7 +93,7 @@ class TestWorkflowDifferentConstructorParams
9393{
9494 private array $ initInput ;
9595
96- #[InitMethod ]
96+ #[WorkflowInit ]
9797 public function __construct (\stdClass $ input )
9898 {
9999 $ this ->initInput = \func_get_args ();
You can’t perform that action at this time.
0 commit comments