Skip to content

Commit 7637106

Browse files
authored
Update workflow.rst
Add Tip for using constants in YAML files to define a large workflow and use these constants everywhere ! :) Cheers to the team <3
1 parent 01d4026 commit 7637106

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

workflow.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ follows:
160160
If you are creating your first workflows, consider using the ``workflow:dump``
161161
command to :doc:`debug the workflow contents </workflow/dumping-workflows>`.
162162

163+
.. tip::
164+
Since Symfony 3.2 (see this :doc:`Blog article <https://symfony.com/blog/new-in-symfony-3-2-php-constants-in-yaml-files>`, you can use constants in YAML files and add some in the BlogPost entity for places ``draft`` by ``!php/const App\Entity\BlogPost::STATE_DRAFT`` or for transitions ``to_review`` by ``!php/const App\Entity\BlogPost::TRANSITION_TO_REVIEW``.
165+
163166
The configured property will be used via its implemented getter/setter methods by the marking store::
164167

165168
// src/Entity/BlogPost.php

0 commit comments

Comments
 (0)