+1 YAML I recall when I was learning Symfony a couple of years back, trying to understand the XML format for Propel. What a headache... YAML is much more legible (essentially one setting per line), and easier to edit.
Considering YAML is best to use in documentation, it wouldn't make sense to confuse people with a different default format in the actual code. Having multiple format examples in the documentation also makes the documentation crowded and harder to maintain. I think XML is more for the advanced user who has an IDE setup and can get some possible benefit from auto-completion. I am also worried about adding new custom options to XML configurations. Wouldn't that break the XSD validator? How could that be easily extended? Syntax errors are easy to manage even for a beginner (especially in YAML), the hard part is knowing what options are available _and_ what they do. This goes beyond what configuration format we use as I am not sure how much auto-completion will help you there anyway. Keep up the good work, Andrej http://www.pokret.org/ On 24 сеп, 13:07, Fabien Potencier <fabien.potenc...@symfony- project.com> wrote: > Hi all, > > Symfony2 supports many different formats for its configuration files. By > default, we support XML, YAML, INI, PHP, and Annotations. That's great > as it demonstrates the flexibility of the framework, but we need to > choose one "default" format (the recommend one in the documentation and > the one that bundles should use). > > Right now, the recommended one is XML (but we show YAML by default in > the documentation because it is more concise). But I'm wondering if we > should switch to PHP instead. > > Here is my reasoning: > > * YAML: Even if this is the more readable and simple format, it cannot > be used for the default because it needs a YAML parser and also because > it is really difficult to debug problems in a YAML file (missing :, > tabs, wrong indentation, ...). > > * INI and Annotations: They cannot be used for the default as they are > not suitable for all configurations. > > * XML: Great because you have validation, auto-completion, and > documentation (with XSD) but many people don't like to use XML (verbose, > feels like Java, ...). > > * PHP: Great as there is nothing new to learn. The only drawback I see > is that PHP being dynamic by nature, people can do weird thing in the > configuration files (for instance, changing a configuration setting > based on the current time; and that won't work because the configuration > is cached in a static form). > > What do you think? > > Fabien > > -- > Fabien Potencier > Sensio CEO - symfony lead developer > sensiolabs.com | symfony-project.org | fabien.potencier.org > Tél: +33 1 40 99 80 80 -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
