-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add some xml and php formats #2076
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
Conversation
<!-- src/Acme/EventBundle/Resources/config/validation.yml --> | ||
<class name="Acme\EventBundle\Entity\Participant"> | ||
<property name="age"> | ||
<constraint name="Max"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why Max ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woeps, I used the XML example in Max
as an example, I will change it to Min
.
Hi @wouterj! Personally - but I'd like to know what others think - I'm ok with only having YAML in the I like the 3 formats everywhere else, but not in the Thanks! |
@weaverryan, I don't understand why you don't want the XML and PHP formats here. We have talked about every part of these configuration files in the documentation. We have used the 3 formats there, why shouldn't we use them when we show the complete configuration? |
@wouterj I still feel mixed about the value of this - it would be great to have more formats, but since we're missing actual descriptions of the configuration options, it feels like we're not spending our time in the right place. I would much rather have reference configuration that describes these options and only shows one big YAML tree than no descriptions (as it is now), but with XML and PHP examples. The big YAML tree was almost more of a temporary fix until we actually found more time to document the individual options. In a perfect world, I think we might not have any big tree, but rather the keys themselves are all documented, and an example of how you configure that one option is provided in YAML, PHP and XML when describing that one option. I think this could be a perfect thing for us to push on when we have the hack-day: so many options are very accessible. So my opinion is that we should push in that direction, and hopefully render the big tree either completely unnecessary (and remove it), or a no-longer-very-important extra reference down at the bottom of each page (in just YAML for now). What do you (or anyone else) think? |
Hi @weaverryan! Well, I agree with you, but I think we should merge this and then split it into multiple configuration formats. In the ideally world, we would have each option described like the form reference, but before we get their we should make the quick fix ready for that great shift. |
Update: I removed the constraint formats from this PR and added those to #2214 |
Add some xml and php formats
I've merged this in. I want to focus efforts on expanding the documentation in these areas over covering what the other formats look like, but we can also try keeping these other formats. |
This PR added XML formats in the
reference/configuration
section for the AsseticBundle, WebProfilerBundle and SwiftMailerBundle. It also adds the XML and PHP formats for theMin
constraint.It's my first time that I use xml or PHP for configuration, so I'm not sure about all of them. Please check the examples before merging.
I don't know the schema location and how this should be registered, this should be added before merging.
If this PR is correct and gets merged, I will create the other missing formats in the reference section too.