You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
BPScott
changed the title
[FrameworkBundle][Translation] Don't add Translation into DI when is is disabled in Config
[FrameworkBundle][Translation] Don't add Translation into DI when it is disabled in Config
Dec 6, 2016
…t required (xabbuh)
This PR was merged into the 3.3-dev branch.
Discussion
----------
[FrameworkBundle] don't load translator services if not required
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20791
| License | MIT
| Doc PR |
One step further could be to remove all the loader services (or not register them at all) if only the identity translator is used (i.e. when only forms are enabled, but not translations), but that could be seen as a BC break.
Commits
-------
1e67155 don't load translator services if not required
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 stateenabled: 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.
The text was updated successfully, but these errors were encountered: