Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Config] [Configuration] Add enum case as service parameter example #17910

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

alexandre-daubois
Copy link
Member

Fixes #17407

@carsonbot carsonbot changed the title [Configuration] Add enum case as service parameter example [Config] [Configuration] Add enum case as service parameter example Feb 17, 2023
@javiereguiluz javiereguiluz added this to the 6.2 milestone Feb 17, 2023
@javiereguiluz
Copy link
Member

Everybody loves enums 😍 so this is nice! Thanks Alex.

@javiereguiluz javiereguiluz merged commit b686cf5 into symfony:6.2 Feb 17, 2023
javiereguiluz added a commit that referenced this pull request Oct 15, 2024
This PR was merged into the 6.4 branch.

Discussion
----------

[Config] Fix the XML configuration example for enums

There is no `type="enum"` in the XML file loader.

The bad example was introduced in #17910. However, the issue it was fixing was about a change in Symfony for **PHP** config files only. The Yaml and XML file loaders don't have any dedicated syntax for enums (but of course, the Yaml component itself does, which is what is used in the Yaml example)

Commits
-------

2f00687 Fix the XML configuration example for enums
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.

[DependencyInjection] Allow enum as service parameter in php config fil…
4 participants