Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[FrameworkBundle][Translation] Don't add Translation into DI when it is disabled in Config #20791

Closed
@BPScott

Description

@BPScott

More of request for comments rater than a "hey this is certainly a bug"...

Using Symfony 3.2 I have disabled translation, validation and form in my FrameworkBundle config as I do not require these items in my application (it's a JSON API). I have confirmed this by running app/console debug:config FrameworkBundle and noting that those three items all state enabled: false.

When I run app/console debug:container I note that the form and validator services are now absent, however translation services are still registered. This is particularly annoying as there are 28 of them.

Is it possible for the translate service config to not be loaded if it (and everything that depends upon it) has been disabled in the config?

Looking at the extension config I note that forms require translation. Perhaps this could be reworked in a similar manner to the validation registration so that it is only forced to load if the form component is also enabled.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions