Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Constraints] Fixed incosistenties and reordered config blocks #2247

Merged
merged 1 commit into from Mar 8, 2013

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Feb 18, 2013

Q A
Doc fix? yes
New docs? no
Applies to all
Fixed tickets -

I planned to do a config block reorder PR, but before that, I just want to know what you think about this. This PR reordered the configuration blocks in the constraints reference and fixes some other issues with the examples.

If you think it is good to recheck the order of all configuration blocks in the docs, we should think of the best order. In general, it will be yaml, [annotations,] xml, php, but in the big bundles, you see that xml is used a lot for service configuration, we should maybe have a xml, yaml, php order there.

PS: I don't start with the next PR about this topic soon, let's document important features first! 馃摌

@stof
Copy link
Member

stof commented Feb 18, 2013

I would still keep Yaml as first block for services. Many people are using YAML in their projects AFAIK as it is less verbose. However, we should take care to have the XML version on all examples.
For application configs, I think most people are using YAML (which is far more readable than the verbose XML) so it should also stay first.

Big bundles are using XML because it is the best practice advocated for shared bundles (the XSD validation forbids a bunch of mistakes as they are spotted early instead of during a WTF).

@ludofleury
Copy link

Here's a poll about configuration format usage: https://docs.google.com/forms/d/15pMCom5qzk5IpKPqfGqmRvLhiGIt0_zKMA4FZtrJyos/viewform

I will publish the result at the end of the week.

@lyrixx
Copy link
Member

lyrixx commented Feb 19, 2013

Btw, on a mainling/issue (don't remember, sorry) people said symfony.com could set a cookie to keep the "prefered" config type.

@wouterj
Copy link
Member Author

wouterj commented Feb 19, 2013

@lyrixx we already had some discussion about that in #1883

@lyrixx
Copy link
Member

lyrixx commented Feb 19, 2013

@wouterj Yes, thanks ;) I remember now

weaverryan added a commit that referenced this pull request Mar 8, 2013
[Constraints] Fixed incosistenties and reordered config blocks
@weaverryan weaverryan merged commit 9ef9117 into symfony:2.0 Mar 8, 2013
@weaverryan
Copy link
Member

Hi guys!

It depends on which area we're talking about (so @ludofleury's poll asks it well), but here's where we stand now:

  • ORM: annotations, yaml, xml
  • Validation: yaml, annotations, xml, php
  • Services: yaml, xml, php
  • Routing: yaml, xml, php (annotations not shown)

I feel very good about this - we decided a long time ago to show YAML, and it seems to be what most people use. The only questionable one for me is validation - I can't remember why we put yaml before annotations, personally I do validation in annotations.

@weaverryan
Copy link
Member

Oh, and I forgot to say thanks to @wouterj for this PR 馃憤 for consistency!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants