-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Updated the Workflow articles to Symfony 4 #8654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
symfony/recipes#256 has been merged |
workflow/state-machines.rst
Outdated
|
||
public function __constructor(Registry $workflows) | ||
{ | ||
$this->stateMachine = $workflows->get('pull_request'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not do that inside the constructor. You'll never know when your service is initialized and if the registry is ready at this point which could lead to undesired side effects.
workflow/usage.rst
Outdated
{ | ||
public function edit(Registry $workflows) | ||
{ | ||
$post = new \App\Entity\BlogPost(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a use statement for the class instead of using the FQCN here.
workflow/usage.rst
Outdated
// ... | ||
} | ||
|
||
// See all the available transition for the post in the current state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
transitions
workflow/usage.rst
Outdated
@@ -250,7 +272,8 @@ order: | |||
* ``workflow.[workflow name].announce`` | |||
* ``workflow.[workflow name].announce.[transition name]`` | |||
|
|||
Here is an example how to enable logging for every time a the "blog_publishing" workflow leaves a place:: | |||
Here is an example how to enable logging for every time the ``blog_publishing`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[...] an example of [...]
…, weaverryan) This PR was merged into the master branch. Discussion ---------- Updated the Workflow articles to Symfony 4 The new file config paths are pending of this: symfony/recipes#256 Commits ------- 70dda7c adding use f9bb412 minor tweaks 8c540ce Removed an unneeded comment (Flex now includes Console by default) 5088d0e Lots of fixes 0261149 Fixed a typo 9690dfd Updated the Workflow articles to Symfony 4
The new file config paths are pending of this: symfony/recipes#256