Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
To save some code load on every page, we can and should move update_requirements to update.install.
Comment | File | Size | Author |
---|---|---|---|
#4 | 669556-4.update-requirements.patch | 12.65 KB | dww |
#3 | 669556-update-requirements-D7.patch | 12.76 KB | Dave Reid |
#1 | 669556-update-requirements-D7.patch | 12.76 KB | Dave Reid |
Comments
Comment #1
Dave ReidI didn't change any t()'s to $t() since this code runs during runtime and never install.
Comment #3
Dave ReidOops. No failing tests this time.
Comment #4
dwwThe only tiny issue I have with #3 is that it includes an unrelated bug fix. I just moved that to #669714: Remove unnecessary menu_rebuild() from update_uninstall(). Rerolled to remove the 1 line change...
Comment #5
dwwEven though it's technically my patch, I'm going to call #4 RTBC, since a) it's overwhelmingly Dave's code in the first place, I just moved a single line to a different patch and b) it's mostly just moving a few functions from one file to another.
Historical note: I originally put this code in update.module instead of update.install since I was thinking that since we load this via hook_help(), it'd be better to just have it in the .module file than to pull in all of .install, too. However, that was admin-centric thinking. It's true that on admin/*, this patch pulls in slightly more code, but we save a lot of code on all the paths that aren't admin/*, and those are vastly more frequent and important.
Comment #6
webchickThis works for me. Best practice, afaik, is to always put hook_requirements() in .install since phase == 'install' code will only run there anyway.
Committed to HEAD.