Updates aren't applied when enabling module via drush, but when enabling it from extend menu, you'll get updates applied. Due to this, you might get randomly 200+ language files updated by simply enabling module that's not any way related to the pile of files.
Committed/pushed to 10.0.x and cherry-picked to 9.4.x, thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2807949-update-2.patch | 1.31 KB | tim.plunkett |
Issue fork drupal-2807949
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
tim.plunkettUpdate only hooks into the UI for installing/uninstalling modules. It should do what it does for themes, and run anytime things are installed/uninstall, regardless.
Comment #12
tedbowLooks good but it would be good if we had tests. Could we install a module directly to from the
module_installerservice to test this?Comment #13
tedbowI chatted with @kunal.sachdev about and making a test for this.
This could probably be a kernel test. If we look at
update_storage_clear()it just clears 2 keyvalue collecitonsSo for the test we should:
$this->container->get('module_installer')->install(['help'])Comment #18
kunal.sachdev commentedComment #19
tedbow@kunal.sachdev this is looking good!
Needs work for MR comments. We also should have `test-only` branch so we can prove the tests fail without the changes to `update.module`
Comment #21
kunal.sachdev commentedCreated new branch 'test-only' to prove that the tests fail without the changes in `update.module`.
Comment #22
kunal.sachdev commentedComment #23
tedbowThanks @kunal.sachdev.
Looks good!
Comment #25
catchThis looks good.
While no contrib module uses
update_storage_clear_submit()and I think it's fine to remove without any notification, I'm only going to backport this to 9.4.x just in case. Another option here would have been to deprecate the submit handler for removal in 10.0.x (without test coverage, just the @deprecated and trigger_error()), but with no real-world uses that also seems like noise.Comment #26
tedbow@catch thanks for committing this. I think with just 8 followers for a 6 year old issue I don't think there is great need to backport this to 9.3.x