[[https://www.php-fig.org/psr/psr-11/|PSR-11]] specifies a standard interface for service containers and related classes. It has been accepted in February 2017.
Since it's generally a good idea to be compatible with light weight standards, we should investigate whether we can make ServiceContainer and friends compatible with PSR-11.
There are essentially two contradictory ways to do this:
* calling code should bing to PSR-11, which we implement according to our needs. We'd have controls over internals of the service container, but MediaWiki could also use a different service container implementation.
* calling code binds to our own interfaces, and we implement them on top of PSR-11. (framework isolation). We can then decide to use our own PSR-11 implementation or a standard one, or override bits and pieces of the standard. Calling code would keep using interfaces tailored specifically for MediaWiki.
This needs more investigation to come up with a concrete proposal that could then be turned into an RFC and implemented.