File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,10 +38,7 @@ final class WorkflowMethod
3838 /**
3939 * Marks this as a dynamic (catch-all) workflow: it is invoked when the
4040 * worker receives a workflow whose type name is not statically registered.
41- * At most one dynamic workflow may be registered per worker. The handler
42- * reads the actual type name via {@see \Temporal\Workflow::getInfo()} and
43- * receives the raw arguments (declare a {@see \Temporal\DataConverter\ValuesInterface}
44- * parameter to access them).
41+ * At most one dynamic workflow may be registered per worker.
4542 */
4643 #[Immutable]
4744 public bool $ dynamic = false ;
Original file line number Diff line number Diff line change 1414use Temporal \Workflow \WorkflowInterface ;
1515use Temporal \Workflow \WorkflowMethod ;
1616
17- /** @WorkflowInterface */
1817#[WorkflowInterface]
1918class WorkflowWithAnotherDynamic
2019{
21- /** @WorkflowMethod(dynamic=true) */
2220 #[WorkflowMethod(dynamic: true )]
2321 public function handler (): void
2422 {
Original file line number Diff line number Diff line change 1414use Temporal \Workflow \WorkflowInterface ;
1515use Temporal \Workflow \WorkflowMethod ;
1616
17- /** @WorkflowInterface */
1817#[WorkflowInterface]
1918class WorkflowWithDynamic
2019{
21- /** @WorkflowMethod(dynamic=true) */
2220 #[WorkflowMethod(dynamic: true )]
2321 public function handler (): void
2422 {
Original file line number Diff line number Diff line change @@ -54,26 +54,21 @@ public function testWorkflowWithoutHandler(WorkflowReader $reader): void
5454 $ this ->assertNull ($ prototype ->getHandler ());
5555 }
5656
57- /**
58- * @param WorkflowReader $reader
59- * @throws \ReflectionException
60- */
57+ /** @throws \ReflectionException */
6158 #[TestDox("Reading a dynamic (catch-all) workflow sets the dynamic flag " )]
62- #[DataProvider('workflowReaderDataProvider ' )]
63- public function testDynamicWorkflow (WorkflowReader $ reader ): void
59+ public function testDynamicWorkflow (): void
6460 {
61+ $ reader = new WorkflowReader (new AttributeReader ());
62+
6563 $ this ->assertTrue ($ reader ->fromClass (WorkflowWithDynamic::class)->isDynamic ());
6664 $ this ->assertFalse ($ reader ->fromClass (SimpleWorkflow::class)->isDynamic ());
6765 }
6866
69- /**
70- * @param WorkflowReader $reader
71- * @throws \ReflectionException
72- */
67+ /** @throws \ReflectionException */
7368 #[TestDox("At most one dynamic workflow may be registered per worker " )]
74- #[DataProvider('workflowReaderDataProvider ' )]
75- public function testMultipleDynamicWorkflowsAreRejected (WorkflowReader $ reader ): void
69+ public function testMultipleDynamicWorkflowsAreRejected (): void
7670 {
71+ $ reader = new WorkflowReader (new AttributeReader ());
7772 $ collection = new WorkflowCollection ();
7873 $ collection ->add ($ reader ->fromClass (WorkflowWithDynamic::class));
7974
You can’t perform that action at this time.
0 commit comments