-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Remove "*.class" parameters #5001
Comments
👍 I do agree with you @pamil |
👍 for services not related to the Resources! |
Not that rare in our case Mr. Fabpot, it's actually very convenient:
If you decide to do this, it would be great if you wait until after 0.18. |
Or... I would actually prefer the performance of a smaller container so go ahead, we can cope with it easily enough 👍 |
For some classes, I think it still makes sense, most of form types, etc. We should make a list and decide what is good for DX. |
@peteward why don't you use service decorator ? (http://symfony.com/doc/current/components/dependency_injection/advanced.html#decorating-services) |
I have a love/hate relationship with decorators. Sometimes it's a great pattern, other times it causes mass confusing and limitations (as I've experienced trying to work with some of the Sylius decoration). But yes, we use it in some cases, sometimes we override the entire service definition (if we need to use different arguments), but sometimes it's just really easy and convenient to override a single class parameter. Also decoration only works if you're keeping the underlying behaviour the same, which in some cases we aren't. |
I had to specifically override a class due to #4959 . It would have been a lot harder without the class names. If Sylius tries harder with BC issues, then I won't mind so much though. |
I've just sent the PRs removing all obvious usages of
|
Created issue #6281 specific for ResourceBundle, closing this one for clarity. |
We have two types of
*.class
parameters:sylius.model.resource.class
etc.In this RFC I would like to address the second ones, reasoning behind removing these is similar to Symfony (citation from initial symfony/symfony#11881):
The text was updated successfully, but these errors were encountered: