8000 Updated the Workflow articles to Symfony 4 by javiereguiluz · Pull Request #8654 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 6 commits into from
Nov 16, 2017

Conversation

javiereguiluz
Copy link
Member

The new file config paths are pending of this: symfony/recipes#256

@xabbuh xabbuh changed the title [WCM] Updated the Workflow articles to Symfony 4 Updated the Workflow articles to Symfony 4 Nov 15, 2017
@xabbuh
Copy link
Member
xabbuh commented Nov 15, 2017

symfony/recipes#256 has been merged


public function __constructor(Registry $workflows)
{
$this->stateMachine = $workflows->get('pull_request');
Copy link
Member

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.

{
public function edit(Registry $workflows)
{
$post = new \App\Entity\BlogPost();
Copy link
Member

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.

// ...
}

// See all the available transition for the post in the current state
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

transitions

@@ -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``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[...] an example of [...]

@xabbuh xabbuh added this to the 4.0 milestone Nov 15, 2017
@weaverryan weaverryan merged commit 70dda7c into symfony:master Nov 16, 2017
weaverryan added a commit that referenced this pull request Nov 16, 2017
…, 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0