Skip to content

Load PHP (and XML) config automatically in Kernel.php (i.e. MicroKernelTrait) #45116

Closed
@ThomasLandauer

Description

@ThomasLandauer

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:

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions