Description
Description
https://symfony.com/doc/current/configuration.html#configuration-formats praises Symfony's flexibility with 3 configuration formats. However, only YAML does work out of the box ;-)
(Took me some time to figure this out - see #45100 )
Anyway, before documenting this more clearly, I'd like to suggest to improve the code. So my main question is: Why aren't php and xml loaded automatically? Is this a performance issue?
Forcing users (in this case even new users) to hack around in their Kernel.php
is not the best idea IMO. And since the Kernel got emptied out in #42991, adding something there feels "hackier" than ever.
Besides, I had the impression that the idea in #37186 was to completely move from yaml to php (in the long run), so I'm wondering why Kernel.php
is moving in the opposite direction, so to say.
Strait away my alternative suggestions if you're not going to change it:
- There should be copy-pastable code at https://symfony.com/doc/current/configuration.html#configuration-formats
- This code should also be present (commented out) in the recipe: https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/5.4/src/Kernel.php
- For more experienced users an installation option would be nice - to start with php right away (i.e. a recipe that creates
framework.php
instead offramework.yaml
etc.) - but this is a separate issue :-)
Example
No response