0

I am newbie to Symfony framework. I have downloaded symfony application using symfony installer.

By default all the configuration files inside the app/config directory (such as parameters.yml, security.yml, routing.yml) are in "yml" formats. I wish to have those files to be available in "xml" format.

Is there any option to download those configuration files in xml format by default while installing it or is there any command line commands available to generate all the configurations files to"xml" formats after installing it?

Kamal
  • 486
  • 1
  • 6
  • 14
  • 1
    Nothing built in. I suppose it could be done in theory. But go with the flow for now and use Symfony the way it was designed until you get a bit more comfortable with it. – Cerad Jan 01 '16 at 15:50
  • Are you looking for a feature XML provides that YAML doesn't? – Jared Farrish Jan 01 '16 at 16:05
  • @Cerad Thanks for your suggestion. – Kamal Jan 01 '16 at 16:22
  • @JaredFarrish I read in the symfony book documentation that xml format is more powerful than YAML and also supports autocompletion in IDE. And also I am using xml formats for routing and doctrine database mapping instead of annotation format . To be more consistent through out the application I wish to know how to generate those configuration also in xml formats. – Kamal Jan 01 '16 at 16:29

2 Answers2

0

I think you may have to do it manually. Here is another article, will give you details.

convert-symfony-yaml-config-files-to-xml-format

Also you can use TuckConverterBundle for symfony version < 3.0

TuckConverterBundle

Community
  • 1
  • 1
TRiNE
  • 5,020
  • 1
  • 29
  • 42
  • Those two links you provided are written for symfony 2 version. I need solutions equivalent to symfony 3 version. And one more thing In the first link you provided , they have provided solutions for how to have xml formats for individual bundles configurations .I am able to do that via command line commands itself. I need xml format files for the whole application which resides inside app/config directory. – Kamal Jan 01 '16 at 16:49
0

Warning ! In symfony2 wasn't possible to have 2 differents format for mapping specification. Ok it's not really symfony it's just for doctrine but I think this is a cross problem (doctrine AND symfony2).

I don't know for SF3 but 2 differents specification format IN SAME TIME in SF2 it's not possible. And a don't think that SF3 bring with this upgrade possibility.

miltone
  • 4,416
  • 11
  • 42
  • 76
  • You think wrong. Symfony itself can easily handle multiple formats. Plus of course the question is how to replace yaml files with xml files. Not how to support multiple formats. – Cerad Jan 02 '16 at 17:47