Skip to content

Commit 95a11be

Browse files
committed
minor #9613 [Workflow] Use subject to fetch state_machine (Matth--)
This PR was merged into the 4.0 branch. Discussion ---------- [Workflow] Use subject to fetch state_machine Not using the subject to fetch the stateMachine will throw an ErrorException because the first argument passed to the get-method is a string and not an object. Commits ------- 279a9c1 [Workflow] Use subject to fetch state_machine
2 parents 0b5a5c6 + 279a9c1 commit 95a11be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

workflow/state-machines.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ you can get this state machine by injecting the Workflow registry service::
205205
$this->workflows = $workflows;
206206
}
207207

208-
public function someMethod()
208+
public function someMethod($subject)
209209
{
210-
$stateMachine = $this->workflows->get('pull_request');
210+
$stateMachine = $this->workflows->get($subject, 'pull_request');
211211
// ...
212212
}
213213

0 commit comments

Comments
 (0)