Remove setData. It feels wrong. Can't we use a storage that reads from staging and writes to active instead?

Add a way to react to import (install new). Perhaps a hook. Or, if we do the previous step, no need for change here -- we already added write-time events which are currently unusable exactly because import goes around the config API and writes the storage directly.

Validate everything before importing.

Give some thought about ordering -- I heard from heyrocker this was supposed to be module order , but I doubt it is enforced.

Remove manifests, the level of meta-ness here makes my head hurt.

Probably this means writing a totally new config import system but ... I am totally game for that.

Comments

chx’s picture

Issue summary: View changes

Updated issue summary.

beejeebus’s picture

Issue tags: +Configuration system

that title is a bit gross.

i like the idea of using config()->save() in import, i don't recall if there is a reason we don't do that.

for validation, there is - #1842956: [Meta] Implement event listeners to validate imports

for ordering, we had an algorithm and code in the import patch around drupalcon denver, but that was thrown away when the import code landed in a different issue. so we could probably dig that up.

for manifests, they are just an implementation detail of the decision to support partial imports. as far as i understand it, that is not a negotiable feature, so we can't remove that complexity, we can only replace it with some other complexity.

xjm’s picture

Title: Write a new, sane config import system » Improve config import system

Agreed.

sun’s picture

I'm missing concrete and clear problem statements in the issue summary.

We certainly won't rewrite config (import) once more just for fun, right before feature freeze. We need to get the remaining tasks done instead. So unless there are concrete and reasonable problems with the current implementation, for which no issue already exists yet, then I think this issue should be moved to D9.

As @beejeebus already mentioned, it looks like there are existing issues that are related to each of the (fuzzy) topics in the queue already. All of them contain discussions and details already, so there's no point in duplicating that here.

heyrocker’s picture

Status: Active » Closed (won't fix)

Additionally, if you wish to break out any of the above into their own issues, please do. I agree however with all the comments above.

beejeebus’s picture

"i like the idea of using config()->save() in import, i don't recall if there is a reason we don't do that" - i created #1887244: use Config->save() and Config->delete() on import for that.

chx’s picture

Issue tags: +sad chx

Tagging.

chx’s picture

Issue summary: View changes

Updated issue summary.