Skip to content
Snippets Groups Projects

feat: run all unran updates each time

1 unresolved thread

Closes #3108658

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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.', [
  • For me this is a big disadvantage - you can't tell people what to upgrade to.

  • Author Developer

    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.

  • Maintainer

    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.

  • Please register or sign in to reply
  • Michael Lutz added 1 commit

    added 1 commit

    • 8d4b864e - chore: fix typos, array_filters

    Compare with previous version

  • Michael Lutz added 1 commit

    added 1 commit

    • 7f6703de - chore: attempt to fix some tests

    Compare with previous version

  • Michael Lutz added 1 commit

    added 1 commit

    • 03bbae83 - fix: don't try to cache previously installed versions in a service member

    Compare with previous version

  • Michael Lutz added 1 commit

    added 1 commit

    • 73595210 - chore: refactor and add a basic test

    Compare with previous version

  • Michael Lutz added 1 commit

    added 1 commit

    Compare with previous version

  • Michael Lutz added 1 commit

    added 1 commit

    Compare with previous version

  • Michael Lutz
  • Michael Lutz added 1 commit

    added 1 commit

    • e4cae6d5 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Michael Lutz added 1 commit

    added 1 commit

    • 66522b41 - fix: don't store empty array for uninstalled modules

    Compare with previous version

  • Please register or sign in to reply
    Loading