I am working on symfony2 and currently creating an application with it, I can use yml or php format for configuring my application. however i am looking for the best approach to define configuration. what are the advantages of each and what are the demerits. also i would like to know which one provides much security.
Share
There’s no difference if you’re worried about performance. Everything is compiled to PHP anyway so the performance is the same.
It’s just a matter of taste really. Choose the one that you fill most comfortable with. Yml is the most concise, XML can be validated and PHP… I’m not sure if anyone uses it.
XML is probably the format that IDEs will like as it’s easy to build validation and autocompletion tools around it. If you plan to release your bundles to the community than it is the advised format to use.