Skip to content

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues -
License MIT

Similar to #61596 but for transitions.

Also replaces #57873 per @stof's comment at #57873 (comment)

@nicolas-grekas
Copy link
Member Author

Status: needs work

While adding tests, I figured out the normalization logic is broken, as highlighted by the failures when using XML.

Copy link
Member Author

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

Status: needs review

</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="key" type="xsd:string" />
Copy link
Member Author

Choose a reason for hiding this comment

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

In XML, we have to differentiate the name and the key of transitions, so that deep-merging them works the same way as in other config formats (appending numeric keys and recursing into associative ones).

/cc @jakubtobiasz FYI this is how you'll be able to leverage this fix - use attribute "key" instead of "name" if you use the XML format to define workflows.

$guardsConfiguration[$eventName][] = new Definition(
Workflow\EventListener\GuardExpression::class,
[new Reference($transitionId), $transition['guard']]
);
Copy link
Member Author

Choose a reason for hiding this comment

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

too many intermediary variables made me wonder about this piece of code for too long

@nicolas-grekas nicolas-grekas merged commit e33fcd6 into symfony:6.4 Sep 16, 2025
9 of 11 checks passed
@nicolas-grekas nicolas-grekas deleted the fwb-w-config branch September 16, 2025 13:52
This was referenced Sep 27, 2025
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