Skip to content

[Routing] Add example of Requirement enum #20409

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

Merged

Conversation

alamirault
Copy link
Contributor

Requirement Enum values are not cases but constants.

So in YAML routing format we must use !php/const instead of !php/enum.

This PR add examples to how to use the "Requirement enum"

Can you confirm constants are not supported in XML format for routing ? (if not, maybe we can make PR like symfony/symfony#58035 cc @alexandre-daubois)

@javiereguiluz
Copy link
Member

Yes, this is a bit confusing. But your example will make things much more clear. Thanks Antoine!

@javiereguiluz javiereguiluz merged commit 4a27315 into symfony:6.4 Nov 27, 2024
3 checks passed
@alamirault alamirault deleted the feature/45528-requirement-enum-example branch November 28, 2024 17:05
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