Skip to content

[Workflow] Fix configuration examples - #23530

Merged
javiereguiluz merged 1 commit into
symfony:7.4from
BenMacha:docs-workflow-fixes
Dec 2, 2026
Merged

javiereguiluz merged 1 commit into
symfony:7.4from
BenMacha:docs-workflow-fixes

Conversation

@BenMacha

Copy link
Copy Markdown
Contributor

A few examples in the workflow docs don't work as written on 7.4:

  • is_authenticated in the guard examples is a function of the security expression provider, so it must be called as is_authenticated(). Without the parentheses the expression parser treats it as an unknown variable.
  • Some PHP config examples still used $framework->workflows()->workflows('...'). The generated config builder method is workflow() (the other examples were already fixed in [Workflow] doc: fix php workflow examples #21720).
  • The XML examples used <framework:marking-store type="single_state"> with an <framework:argument> child. single_state is not a valid type anymore (the XSD and the config tree only accept method) and argument is not a valid option, so they now use type="method" property="..." like the YAML and PHP examples.
  • The custom marking store example imported ReflectionMarkingStore but used BlogPostMarkingStore.
  • In the metadata example, the to_review transition went to review, which is not a place of the blog_publishing workflow (the PHP version of the same example already used reviewed).
  • The default value of the marking store property option is the string marking, not ['marking'].

- call is_authenticated() as a function in guard expressions
- use workflow() instead of workflows() in the PHP config builder
- use the existing "method" marking store type and the "property" attribute in XML examples
- import the BlogPostMarkingStore class that is used in the custom marking store example
- use the "reviewed" place in the metadata example
- fix the default value of the marking store "property" option
@javiereguiluz

Copy link
Copy Markdown
Member

Thank you @BenMacha.

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.

3 participants