Skip to content

[WIP] Improvements to Workflow documentation #10757

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

Closed
wants to merge 2 commits into from

Conversation

jzawadzki
Copy link
Contributor

Pull request that tries to implement ideas described in #10747
Marked as WIP as it's definitely not final version, but it's ready for first reviews

#SymfonyConHackDay2018


Component does also support state machines. A state machine is a subset
of a workflow and its purpose is to hold a state of your model. Read more about the
differences and specific features of state machine in :doc:`/workflow/state-machines`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it could be usefull to explain why a developer should/must/can use this component inside its project.

With a sentence like : Use case: if in your project you are using a $status on an object, with notions of progression/validation, this component can be a solid foundation/wrapper.

wdyt?

@@ -1,477 +0,0 @@
.. index::
Copy link
Contributor

Choose a reason for hiding this comment

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

by removing this file, can you just see this one ?
https://github.com/symfony/symfony-docs/pull/10751/files
do you think we can merge both PR together?

@noniagriconomie
Copy link
Contributor

@jzawadzki there are some nice doc code here, are you going to finish this PR?
I think it can be very helpfull :)

use Symfony\Component\Workflow\Registry;
use App\Entity\BlogPost;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Workflow\Exception\TransitionException;
Copy link
Contributor

Choose a reason for hiding this comment

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

please use ordered use statements

}
}

.. versionadded:: 4.1
Copy link
Contributor

Choose a reason for hiding this comment

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

please add a blankline after the versionadded directive

The :class:`Symfony\\Component\\Workflow\\Exception\\TransitionException`
class was introduced in Symfony 4.1.

.. versionadded:: 4.1
Copy link
Contributor

Choose a reason for hiding this comment

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

please add a blankline after the versionadded directive

@@ -12,8 +12,6 @@ Use the ``GraphvizDumper`` or ``StateMachineGraphvizDumper`` to create DOT
files, or use ``PlantUmlDumper`` for PlantUML files. Both types can be converted
to PNG or SVG images.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
to PNG or SVG images.
to PNG or SVG images::

@@ -12,8 +12,6 @@ Use the ``GraphvizDumper`` or ``StateMachineGraphvizDumper`` to create DOT
files, or use ``PlantUmlDumper`` for PlantUML files. Both types can be converted
to PNG or SVG images.

Images of the workflow defined above:

.. code-block:: php
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.. code-block:: php

See example to make sure no blog post without title is moved to "review"::

use Symfony\Component\Workflow\Event\GuardEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use ordered use statements

{
public function guardReview(GuardEvent $event)
{
/** @var \App\Entity\BlogPost $post */
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/** @var \App\Entity\BlogPost $post */
/** @var App\Entity\BlogPost $post */

@noniagriconomie
Copy link
Contributor

@jzawadzki is it possible for you to finish / rewrite this one based on last code version?
I think there are some good ideas to have on the doc :)

@jzawadzki
Copy link
Contributor Author

hi @noniagriconomie - yes, will update it tomorrow

@lyrixx
Copy link
Member

lyrixx commented Sep 10, 2019

Most of the doc in this PR is already merged.
Could you rebase please?

@javiereguiluz
Copy link
Member

I'm really sorry that we didn't merge this on time and I apologize for that. Sadly, since this pull request stalled, we merged many other related pull requests which implemented all these changes, so we must close this one without merging it. I'm sorry.

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.

6 participants