Problem/Motivation

See #2354889-115: Make block context faster by removing onBlock event and replace it with loading from a ContextManager

Now that I think about it, I think ContextStackManager could be a plugin manager, with each of the context providers as plugins. Then the tagged services goes away in favour of Context Plugins and the service IDs become plugin IDs.

And
#2354889-128: Make block context faster by removing onBlock event and replace it with loading from a ContextManager

the main advantage is if say contrib provides another 20 context providers, we don't end up with another 20 services in the container, instead just the plugin manager.

Then there's the DX and consistency with other plugins. Simpler to copy a file than add a service.

Proposed resolution

Explore the option

Remaining tasks

Discuss and finalize

User interface changes

N/A

API changes

TBD

Data model changes

TBD
Follow-up to #2354889: Make block context faster by removing onBlock event and replace it with loading from a ContextManager

Comments

dawehner’s picture

Well, with that argumentation we can open up an issue to convert the cache contexts as well.

jibran’s picture

Status: Postponed » Active
dawehner’s picture

I think this issue is not worth to do it.

Berdir’s picture

Agreed, I think services is a better match for context.

dawehner’s picture

Status: Active » Closed (won't fix)

Thank you @jibran for creating the issue
It is absolutely not bad to discuss such issues ...