File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ public function buildStep(array $stepDefinition): mixed
57
57
'conditional ' => $ this ->buildConditionalStep ($ stepDefinition ),
58
58
'class ' => $ this ->buildClassStep ($ stepDefinition ),
59
59
'step ' => $ this ->buildClassStep ($ stepDefinition ),
60
+ 'action ' => $ this ->buildClassStep ($ stepDefinition ), // Support for official action syntax
60
61
'group ' => $ this ->buildGroupStep ($ stepDefinition ),
61
62
'nested ' => $ this ->buildNestedStep ($ stepDefinition ),
62
63
default => throw new RuntimeException ("Unknown step type: {$ type }" )
@@ -213,10 +214,14 @@ private function buildNestedStep(array $stepDefinition): \Grazulex\LaravelFlowpi
213
214
214
215
private function buildClassStep (array $ stepDefinition ): string
215
216
{
216
- $ class = $ stepDefinition ['class ' ] ?? $ stepDefinition ['step ' ] ?? null ;
217
+ // Try to get class name from multiple possible fields (maintain compatibility)
218
+ $ class = $ stepDefinition ['class ' ]
219
+ ?? $ stepDefinition ['step ' ]
220
+ ?? $ stepDefinition ['name ' ]
221
+ ?? null ;
217
222
218
223
if (! $ class ) {
219
- throw new RuntimeException ('Class step must have a "class" or "step " field ' );
224
+ throw new RuntimeException ('Class step must have a "class", "step", or "name " field ' );
220
225
}
221
226
222
227
return $ this ->buildStepFromClass ($ class );
You can’t perform that action at this time.
0 commit comments