Closed
Description
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 #9003).
Metadata
Metadata
Assignees
Labels
RFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)