Task #104724
closedEpic #104723: ext:adminpanel creates a huge mess
DI in admin panel broken due to ModuleDataStorageCollection
100%
Description
ModuleDataStorageCollection extends SplObjectStorage.
This means it is a list of the module objects and those park 'moduleData' as 'info'.
This is then serialized and put into cache_adminpanel_requestcache, and later get() from cache again. (MainController).
Now, when any of such modules or submodules (like Event.php) have DI, those are serialized, and unserialized.
Well ... that's not good since it catapults the size of those cache entries far into MB range when DI is used. And worse, as soon as there is some closure in it (like Container has), serialize() will fail since closures can't be serialized. And hey: Never "cache" DI stuff ...
I for now push a WIP patch, that throws this object storage away and substitutes it with a array, with array-keys being the class names ... but i'm unsure if that's it.
See also #104725 of this epic as a second major fail.
This is not trivial to follow codewise, and it does not happen with all modules/submodules, depending on if they implement DataProviderInterface.