My head and my lint checker are spinning at the repeated redefinition of the $module variable in update.inc as an incorrectly duplicate loop variable.
Formally the lint checker reports
The 'module' variable used as a key foreach loop is already used in the same way by the outer foreach loop.
the nested loops are defined on line 603 ( outer )
foreach (\Drupal::keyValue('system.schema')->getAll() as $module => $schema) {
and 622 ( inner )
foreach ($result as $module => $module_data) {
the problem comes seeing at a glance just which $module is intended here.
if (!isset($return[$module][$update][$module_dependency]) || $update_dependency > $return[$module][$update][$module_dependency]) {
$return[$module][$update][$module_dependency] = $update_dependency;
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | interdiff-1-4.txt | 3.1 KB | martin107 |
| #4 | module-2342247-4.patch | 2.23 KB | martin107 |
| #1 | module-2342247-1.patch | 2.29 KB | martin107 |
Comments
Comment #1
martin107 commentedOk so not that difficult to unpick.
I have taken the liberty of fixing problems with the annotation blocks I had to read to grok what was going on.
Comment #2
martin107 commentedComment #3
mile23module_load_install()returns either a string or false, since it just returns whatevermodule_load_include()returns (or FALSE).Might as well go for even better readability and change
$resultto$updated_dependenciesand$updateto$update_version.Comment #4
martin107 commented1) Thanks for correcting me ... the more I look at module.inc, the more I see documentation issues ...I will split those changes off into another issue.
2) Yep, those changes make sense to me.
I see you are on a review spree, lots of my issues are being picked up :)
Thank you
Mile23++
Comment #5
mile23Here's an exercise: Open the Drupal issue list. Show only Needs Review. Click the 'last update' column header until its showing you the oldest issues. Go. :-)
The tests pass, the changes look good. RTBC yay!
Comment #6
webchickWow, nice catch.
Committed and pushed to 8.0.x. Thanks!