-
Notifications
You must be signed in to change notification settings - Fork 58
Description
Here is an issue describing why it was done: symfony/symfony#11881
All services in core define their classes as parameters. The convention is to create a foo.class parameter for the class of the foo service. This approach comes with several problems:
The parameters are dumped like any other one in the compiled class and it makes the file larger for no good reasons (read: it slows down your app for free).
When someone wants to change a service, just changing the class name is rarely enough: the new service probably have some different constructor arguments, ... Or put another way, overriding a service by just changing the class name of a service is a very rare use case.
Of course, if several bundles change the value of such a parameter, the "last" definition wins. Classic inheritance vs composition problem.
For all these reasons, I like to remove all those parameters for Symfony 3.0.
On a side note, it's now possible to easily replace a service by decorating it (see symfony/symfony#9003).
There is also a script that Fabien used to do it (for xml files) symfony/symfony#14070 (comment)
All those parameters have been removed already in Symfony 3.0.