Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DependencyInjection] Rename#[InnerService] to#[MapDecorated]#46112
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
#[InnerService] to `#[Decorated]#[InnerService] to#[Decorated]src/Symfony/Component/DependencyInjection/Attribute/Decorated.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
#[InnerService] to#[Decorated]#[InnerService] to#[MapDecorated]src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
512812a to1c7a20aComparefabpot commentedApr 22, 2022
Thank you@chalasr. |
mbrodala commentedApr 25, 2022
Just for understanding: why |
nicolas-grekas commentedMay 2, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
"map" stands for "inject" or "wire", or "autowire" to be more precise - but using a more compact word. |
mbrodala commentedMay 2, 2022
Ah OK, I was confused by the "other" kind of map (key=>value storage). Thanks for the insights. |
nicolas-grekas commentedMay 2, 2022
this works :) |
When talking about the decorator pattern outside of Symfony, the term
inneris pretty much (if not totally) inexistent. Worse, it makes the concept harder to explain. Take "there is a decorator and a decorated object" vs "there is a decorator and an inner object": using the later form, one has to explain both what is the decorator and what is the inner. While using the former, explaining what the decorator makes it obvious what the decorated is.I propose to take the addition of this attribute as an opportunity to start making this special term go away.
Also I removed the
Servicesuffix. It is tempting to keep it for explicitness, but it feels kinda redundant and AFAIK no other core attribute has such redundant suffix, maybe because their namespace is enough to indicate their target.