Last Updated: February 25, 2016
·
915
· ajeliuc

Symfony 2 configuration

If you are just starting your first serious symfony 2 project or you are learning symfony 2 and can not figure out which of configuration formats is the best one - answer is simple: XML

  • XML configuration format is not so convinient as Annotations
  • XML configuration format is not so understandable and readable like YML

BUT IF YOU ARE DEVELOPING NEW REUSABLE BUNDLE

  • It will prevent your project from total refactoring;
  • It will save your life;
  • It will help you to make your bundle universal and upgradable;
  • May be it will help to make your bundle framework independent too;

...and it is enterprice level

USE IT

  • For routing
  • For ORMs and ODMs
  • For services
  • For translations

Note: it is ok when you use yml in your root app/ directory.