Problem/Motivation
From discussions in #2343677: Stack middleware suffers from incomplete service construction, there are probably a lot of services we would want to make private, as getting them as standalone services from the container does not make much sense. They live in the container for swap-ability and inject-ability.
Proposed resolution
- Firstly, discuss if we should actually start to do this. It definitely makes sense but are we allowed now that beta has hit?
- Agree on the services that should be made private, e.g. event subscribers, tagged services (used like serializer does, or maintenance mode subscribers, path/route processors etc..)
- Implement a patch marking services we want as private.
Remaining tasks
All of the above
User interface changes
None
API changes
Potentially some services will become unavailable.
Comments
Comment #1
catchThis is definitely fine post-beta as it clarifies the public api. Also ux improvement when services get autocompleted.
There's a risk we break someone's module by being over zealous or underestimatem. In that case they can inject or we can roll back.
Comment #2
damiankloip CreditAttribution: damiankloip commentedAgreed, I think clarifying what we generally think should be easily available is a good thing. There are a lot of services in the container already, a bit portion of which people will have no business using.
Comment #3
damiankloip CreditAttribution: damiankloip commentedClosing in favour of #2350491: Discuss/implement our usage of private services
Comment #4
damiankloip CreditAttribution: damiankloip commentedComment #5
catchThis was marked duplicate of itself.
Comment #6
catchOh it's #2350545: Protect some services from being referenced from outside container.