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.

CommentFileSizeAuthor
#1 2314347.1.patch10.28 KBalexpott
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott’s picture

Status: Active » Needs review
FileSize
10.28 KB

Patch.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

config.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

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

  • catch committed d9edc3a on
    Issue #2314347 by alexpott: Fixed Remove config.storage dependency from...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.