Problem/Motivation
Originally the \Drupal\Core\Config\ExportStorageManager
was dispatching the transformation event only when needed. For that reason it was listening to events related to configuration changes. In #3077504: Add config_exclude functionality to core we added StorageRebuildNeededEvent because sometimes things might change that are not just dependent on the active configuration.
In the patches for #2991683: Move configuration transformation API in \Drupal\Core\Config namespace (in particular #43) we found out that all the moving parts for this cause some unnecessary trouble with the installer.
Proposed resolution
Less moving parts but dispatching of transformation event more often.
This makes the API more concise. Importing and exporting configuration is a relatively rare event so this does not have a negative impact on site performance.
Remaining tasks
create patch
review
commit
User interface changes
none
API changes
very recently added (in experimental module) event is removed again as it becomes unnecessary.
Data model changes
none
Release notes snippet
n/a
Comment | File | Size | Author |
---|---|---|---|
#7 | 3083065-7.patch | 15.26 KB | Krzysztof Domański |
#7 | interdiff-6-7.txt | 1.01 KB | Krzysztof Domański |
#6 | 3083065-6.patch | 14.25 KB | Krzysztof Domański |
#6 | interdiff-2-6.txt | 3.2 KB | Krzysztof Domański |
#2 | 3083065-2.patch | 13.07 KB | bircher |
Comments
Comment #2
bircherAttached a patch that removes complexity at the cost of maybe-redundant event dispatching.
Comment #3
alexpott+1 for this change. Less moving parts. If we discover later that we need to add something like this then we can.
Comment #4
wouter.adem CreditAttribution: wouter.adem as a volunteer commentedMinor. Remove use statement for EventSubscriberInterface.
Minor. Remove use statement for StateInterface.
Minor. Remove use statement for StateInterface
Minor. Remove use statement for StorageRebuildNeededEvent.
Minor. Comment is a bit unclear. I'd put just something like: Save the config to active storage so that the transformer can alter it.
Comment #5
Krzysztof Domański-- edited --
Comment #6
Krzysztof DomańskiChanges according to #4.
Comment #7
Krzysztof DomańskiThis can also be removed.
Comment #8
wouter.adem CreditAttribution: wouter.adem as a volunteer commentedComment #9
alexpottCommitted 3f4d403 and pushed to 8.8.x. Thanks!
Removed @see to removed constant on commit.
Comment #10
Krzysztof Domański3f4d403 returns "Git Resource Not found" and I don't see this commit on https://git.drupalcode.org/project/drupal/commits/8.8.x.
Comment #11
Krzysztof DomańskiBack to RTBC due to #10.
Comment #13
alexpottComment #14
Krzysztof DomańskiThanks!