-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
#[InnerService]
to `#[Decorated] #[InnerService]
to #[Decorated]
src/Symfony/Component/DependencyInjection/Attribute/Decorated.php
Outdated
Show resolved
Hide resolved
#[InnerService]
to #[Decorated]
#[InnerService]
to #[MapDecorated]
src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php
Outdated
Show resolved
Hide resolved
512812a
to
1c7a20a
Compare
Thank you @chalasr. |
Just for understanding: why |
"map" stands for "inject" or "wire", or "autowire" to be more precise - but using a more compact word. |
Ah OK, I was confused by the "other" kind of map (key=>value storage). Thanks for the insights. |
this works :) |
When talking about the decorator pattern outside of Symfony, the term
inner
is 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
Service
suffix. 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.