Skip to content

Conversation

@nicolas-grekas
Copy link
Member

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

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.

Please approve #60568 @symfony/mergers

->arrayNode($this->getKey())
->fixXmlConfig($this->getKey())
->fixXmlConfig('issuer')
->fixXmlConfig('algorithm')
Copy link
Member Author

@nicolas-grekas nicolas-grekas Sep 10, 2025

Choose a reason for hiding this comment

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

This can be done in 7.3: while both keys algorithm and algorithms exist, they are coalesced in the end.

<xsd:complexType name="config">
<xsd:choice maxOccurs="unbounded">
<xsd:element name="access-decision-manager" type="access_decision_manager" minOccurs="0" maxOccurs="1" />
<xsd:element name="password_hashers" type="password_hashers" minOccurs="0" maxOccurs="1" />
Copy link
Member Author

@nicolas-grekas nicolas-grekas Sep 10, 2025

Choose a reason for hiding this comment

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

This XSD doesn't follow any existing practice (the same issue is fixed for a few other keys below).
Note that the resulting config tree is going to be exactly the same.
It's just validation that might fail if anyone uses XML to define these semantic trees.
This will happen at compile time, so really easy to spot and fix.

Copy link
Member

Choose a reason for hiding this comment

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

It is indeed more standard this way.
These are breaking changes if the old version worked and was valid for the XSD.
Perhaps it would be better to apply these changes in 7.4 only? Or is this a way to trigger potential users of the XML configuration to express themselves?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is :) + an invitation to fix their config!

@OskarStark
Copy link
Contributor

Wow thanks for digging into that mess. Can we somehow ensure this for the future via automatic checks?

@GromNaN
Copy link
Member

GromNaN commented Sep 10, 2025

Wow thanks for digging into that mess. Can we somehow ensure this for the future via automatic checks?

That's something to be careful during reviews.

@stof
Copy link
Member

stof commented Sep 10, 2025

Wow thanks for digging into that mess. Can we somehow ensure this for the future via automatic checks?

I'll try to think about how this could be done.
The general case is that any prototyped array node should have a corresponding fixXmlConfig on the parent node. But I think we have a few weird cases where we normalize things differently (when the prototyped node does not use a proper plural name), preventing us to enforce this rule strictly.

@nicolas-grekas
Copy link
Member Author

Wow thanks for digging into that mess. Can we somehow ensure this for the future via automatic checks?

Part of it is approving ;) #60568
Then I'm playing with something like what @stof suggests this morning, PR to come.

@nicolas-grekas
Copy link
Member Author

@nicolas-grekas nicolas-grekas merged commit 84c65cb into symfony:7.3 Sep 10, 2025
9 of 11 checks passed
@nicolas-grekas nicolas-grekas deleted the fix-plurals branch September 10, 2025 12:11
@fabpot fabpot mentioned this pull request 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.

8 participants