Problem/Motivation
ConfigEntityStorage depends on both the config factory and the config storage this makes it unnecessarily complicated to use it to load configuration from a different storage.
Proposed resolution
Remove config storage dependency since the only reason it has that is to listAll(). ConfigFactory::listAll() exists already and delegates listing to it's storage. That means all we need to do is swap the storage on the config factory and use that factory with ConfigEntityStorage in order to load configuration from a different storage.
Remaining tasks
Review patch.
User interface changes
None.
API changes
ConfigEntityStorage and classes that extend it no longer have a direct dependency on config storage.
Comment | File | Size | Author |
---|---|---|---|
#1 | 2314347.1.patch | 10.28 KB | alexpott |
Comments
Comment #1
alexpottPatch.
Comment #2
dawehnerconfig.factory is THE place people should use to interact with the config system.
I wondered whether it would be possible to change the config.storage to be a private service, thought it is actually used in quite some places
Comment #3
catchCommitted/pushed to 8.x, thanks!