Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9e0cc4c

Browse filesBrowse files
committed
minor #9233 hotfix: missing the call to InstanceOfSupportStrategy (Simperfit, javiereguiluz)
This PR was merged into the master branch. Discussion ---------- hotfix: missing the call to InstanceOfSupportStrategy Updating the exemple I missed the call to instanceOfSupportStrategy which is now needed. Commits ------- fbcf572 Added the use import 379a939 hotfix: missing the call to InstanceOfSupportStrategy
2 parents 30fdd17 + fbcf572 commit 9e0cc4c
Copy full SHA for 9e0cc4c

File tree

1 file changed

+3
-2
lines changed
Filter options

1 file changed

+3
-2
lines changed

‎components/workflow.rst

Copy file name to clipboardExpand all lines: components/workflow.rst
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,16 @@ A registry will also help you to decide if a workflow supports the object you
6363
are trying to use it with::
6464

6565
use Symfony\Component\Workflow\Registry;
66+
use Symfony\Component\Workflow\WorkflowInterface\InstanceOfSupportStrategy;
6667
use Acme\Entity\BlogPost;
6768
use Acme\Entity\Newsletter;
6869

6970
$blogWorkflow = ...
7071
$newsletterWorkflow = ...
7172

7273
$registry = new Registry();
73-
$registry->addWorkflow($blogWorkflow, BlogPost::class);
74-
$registry->addWorkflow($newsletterWorkflow, Newsletter::class);
74+
$registry->addWorkflow($blogWorkflow, new InstanceOfSupportStrategy(BlogPost::class));
75+
$registry->addWorkflow($newsletterWorkflow, new InstanceOfSupportStrategy(Newsletter::class));
7576
7677
.. versionadded:: 4.1
7778
The ``addWorkflow()`` method was introduced in Symfony 4.1. In previous

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.