postponed on #2991683: Move configuration transformation API in \Drupal\Core\Config namespace
Problem/Motivation
We added the config_exclude feature to the config_environment module in #3077504: Add config_exclude functionality to core because the API was added to the experimental module waiting for an implementation. Now we have a use for it and both can move to their intended places.
Once in core and available to everyone, we of course need to update the default settings.php with documentation and an example.
Proposed resolution
Move \Drupal\config_environment\EventSubscriber\ExcludedModulesEventSubscriber
to core.services.
Add documentation.
Remaining tasks
write patch.
decide on documentation.
User interface changes
none
API changes
config_exclude functionality available to everyone no experimental module needed.
This means the functionality is outside of the scope of the experimental config_environment module and is considered stable.
Data model changes
none
Release notes snippet
Modules can be excluded from the configuration synchronisation. See the change notice for more details.
Comment | File | Size | Author |
---|---|---|---|
#24 | interdiff-3079029-20-24.txt | 2.97 KB | bircher |
#24 | 3079029-24.patch | 7.76 KB | bircher |
#20 | interdiff-3079029-18-20.txt | 2.26 KB | bircher |
#20 | 3079029-20.patch | 7.49 KB | bircher |
#18 | interdiff-3079029-17-18.txt | 2.53 KB | bircher |
Comments
Comment #2
bircherComment #3
bircherpostponed on #3077504: Add config_exclude functionality to core and #2991683: Move configuration transformation API in \Drupal\Core\Config namespace
I would vote for doing it in two steps.
My proposal for the documentation in example.settings.local.php:
Ok might as well make a patch for that...
Other wording or entirely other ideas are welcome too!
Comment #4
marcvangendSome thoughts about the documentation text:
Technically speaking, modules are never exported; What happens is that the enabled-status of an excluded module is not exported. But probably if we write that, we would be over-complicating things?
To me, the phrase "it is possible" sounds as if it could be considered in certain situations. However, I think you intend to explain why people should never do this, right? I suggest something like "While it is technically possible to exclude required modules, that would mean that the exported configuration can not be imported anymore." Or maybe even "For instance, it is your own responsibility to never exclude required modules, because it would mean that the exported configuration can not be imported anymore." (PS. "anymore" is one word in this context.)
I don't think the third paragraph needs the "Note:" prefix, the text is just as good without it. I would even argue that it is more important than the second paragraph, so the 2nd and 3rd could be swapped around.
Comment #5
bircherComment #6
ricardoamaro CreditAttribution: ricardoamaro as a volunteer and at Acquia commentedhttps://www.drupal.org/project/drupal/issues/2991683 is now in "Reviewed & tested by the community" state.
++ for config_exclude functionality available to everyone with no experimental module needed !
Keep me posted for when we need to review this one also. :)
Comment #7
bircherAs discussed with alexpott and moshe on the CMI 2 call today.
Attached are two patches, one to review and one including the RTBC patch form #2991683: Move configuration transformation API in \Drupal\Core\Config namespace.
Here we need to add the documentation and we can review this already independently.
This issue adds the thought after feature as stable to core.
Comment #9
bircherOh nice, I missed updating both files, good for the test bot to catch that!
Comment #10
bircherre-rolled patch for manual testing. the review patch is un-touched from #9
Comment #11
ricardoamaro CreditAttribution: ricardoamaro as a volunteer and at Acquia commentedReviewed 3079029-9-review-do-not-test.patch looks fine.
Comment #12
ricardoamaro CreditAttribution: ricardoamaro as a volunteer and at Acquia commentedManual review and test
Also the site functionality seems to be working fine.
Comment #13
ricardoamaro CreditAttribution: ricardoamaro as a volunteer and at Acquia commentedComment #14
catch#2991683: Move configuration transformation API in \Drupal\Core\Config namespace is in.
I haven't reviewed the full patch here, but I can't see anything yet to uninstall / deprecate config_environment module.We would want to do something like the following:1. Mark it hidden2. system_update_N() to uninstall it3. hook_requirements() to prevent it being reinstalled.Or if sites already using the module need to take action, we might want to do only #3 (with an additional runtime warning when it's installed).Also a follow-up to actually remove it wholesale in 9.0.xedit: spoke to bircher in slack. While config_environment will be empty after this patch, there's still a use for it as an alpha experimental module for more config_environment work still to do. So what we actually want to do is completely remove it from 8.8.x and recommit it to 8.9.x/9.0.x as an empty alpha experimental module again. That means the patch here is fine, but I think we should have an explicit followup for the removal since it's an unusual reason to remove an alpha module (normally we'd do that if development is abandoned or it's been deprecated).
Comment #15
bircherCreated the followup #3086465: Remove config_environmment from 8.8.0 and add it to 8.9.x.
Attached is the RTBC patch to make sure it is the last patch on the issue, renamed so that the testbot likes it.
Comment #16
alexpottI think this can be a bit clearer. Something like:
Let's re-flow this comment. to make use of the space.
Comment #17
bircherComment #18
birchersome more improvements form a slack conversation with @alexpott.
I don't know how to improve this further but maybe someone with a fresh look has an even better idea.
Comment #19
catch'excluded [..] are not included' is a bit tautological.
What about 'When exporting configuration, the configuration objects and core.extension.list items for excluded modules will be removed from the final export.
Also 'if excluded modules are already installed' might be better here. Otherwise it sounds like excluded modules are being installed when configuration is imported.
Comment #20
bircheryes that sounds better!
Comment #21
wouter.adem CreditAttribution: wouter.adem as a volunteer commentedAs an outsider I find this explanation a bit confusing.
I'd keep it (maybe to) simple:
Comment #22
bircher#21 is maybe too simple, but I would leave that to someone else to decide.
I added a documentation stub here: https://www.drupal.org/node/3086573
Comment #23
catchhmm I actually like #21 but we might want to do a combination of both, something like this:
"On config export sync, no config or dependent config of any excluded module is exported.
On config import sync, any config of any installed excluded module is ignored.
In exported configuration, it will be as if the excluded module had never been installed. When syncing configuration, if an excluded module is installed, it will not be uninstalled by the configuration sync, and dependent configuration will remain intact."
Comment #24
bircherthe latest proposal.
Comment #25
wouter.adem CreditAttribution: wouter.adem as a volunteer commentedComment #26
alexpottCommitted 1d8712f and pushed to 8.8.x. Thanks!
Credited everyone for the discussion on the comment.
Yay CMI 2.0 has got something in core as stable. win! Great work everyone!