File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ you can get the workflow by injecting the Workflow registry service::
181
181
use Symfony\Component\Workflow\Registry;
182
182
use App\Entity\BlogPost;
183
183
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
184
- use Symfony\Component\Workflow\Exception\LogicException ;
184
+ use Symfony\Component\Workflow\Exception\TransitionException ;
185
185
186
186
class BlogController extends Controller
187
187
{
@@ -200,7 +200,7 @@ you can get the workflow by injecting the Workflow registry service::
200
200
// Update the currentState on the post
201
201
try {
202
202
$workflow->apply($post, 'to_review');
203
- } catch (LogicException $exception) {
203
+ } catch (TransitionException $exception) {
204
204
// ... if the transition is not allowed
205
205
}
206
206
@@ -209,6 +209,10 @@ you can get the workflow by injecting the Workflow registry service::
209
209
}
210
210
}
211
211
212
+ .. versionadded :: 4.1
213
+ The :class: `Symfony\\ Component\\ Workflow\\ Exception\\ TransitionException `
214
+ class was introduced in Symfony 4.1.
215
+
212
216
Using Events
213
217
------------
214
218
You can’t perform that action at this time.
0 commit comments