feat: run all unran updates each time
Closes #3108658
Merge request reports
Activity
added 1 commit
- 72892baf - chore: don't change member name, dont inject modulehandler
1536 1536 } 1537 1537 } 1538 1538 } 1539 1540 if (empty($missing_updates)) { 1541 $modules = \Drupal::moduleHandler()->getModuleList(); 1542 foreach ($modules as $module => $module_info) { 1543 $available_updates = $update_registry->getAvailableUpdates($module); 1544 $previous_updates = $update_registry->getPreviouslyInstalledSchemaVersions($module); 1545 $missing_updates = array_diff($previous_updates, $available_updates); 1546 if ($missing_updates) { 1547 foreach ($missing_updates as $missing) { 1548 $requirements[$module . '_update_missing'] = [ 1549 'title' => t('Missing updates for: @module', ['@module' => $module_info->info['name']]), 1550 'description' => t('The version of the %module module that you are attempting to update to is missing update @future_update (which has previously been run). Update to a later version.', [ I agree. I didn't have an immediate solution while looking to adapt your requirements code, but I've been thinking about it. Obviously the only way to have this information is to decorate the hook somehow (which was what I was trying to avoid making developers do). Might have to make an attribute after all that we could optionally tag hooks that we intend to skip a version to provide the minimum next major version that the update would be available in.
I agree that it's less nice, but we can tell them to "update to the latest version" which is what we do everywhere else. It's also less fragile than the previous approach -- there was always the possibility that update XYZ wouldn't be in whatever release, or that a different update would require a different release and therefore there'd be conflicting info, etc.
added 1 commit
- 03bbae83 - fix: don't try to cache previously installed versions in a service member
- Resolved by Michael Lutz
added 1 commit
- 66522b41 - fix: don't store empty array for uninstalled modules