Problem/Motivation

Follow-up to address #3113992-79: The 'Update' page has no idea that some updates are incompatible (point 3).

In that issue, we're adding a private helper method, UpdateManagerUpdateForm::removeCheckboxFromRow()

That was a compromise to avoid some code duplication and make things easier to read, while trying not to explode the scope of that critical bugfix for a wider refactoring. However, as we now have 3 possible tables on that form, and only one of them needs checkboxes, we should refactor how this all works.

Proposed resolution

Instead of building up $entry as if it needs a checkbox from the start, the buildForm() method should use a more simple data structure as the bulk of that method runs to store the stuff we always care about (project name, currently installed version, recommended update, etc). Then, once we know what table the entry belongs in, we should have a helper method that converts it into a row that's appropriate for either '#theme' => 'table' or 'tableselect' as appropriate.

#3121769: Make the table of incompatible releases in UpdateManagerUpdateForm more theme-friendly is related to this, since that issue might introduce an entirely different twig template for the 'Not compatible' table, so the helper method might need to do something different to generate rows for that table, too.

Remaining tasks

  1. Decide exactly how we want this to all work.
  2. Implement it.
  3. Ensure we didn't break anything.
  4. Reviews/improvements.
  5. RTBC.
  6. Commit.

User interface changes

None.

API changes

Nothing public. Only changes to private or protected methods..

Data model changes

None.

Release notes snippet

N/A.

Comments

dww created an issue. See original summary.

dww’s picture

Title: Refacto UpdateManagerUpdateForm::buildForm() to make ::removeCheckboxFromRow() unnecessary » Refactor UpdateManagerUpdateForm::buildForm() to make ::removeCheckboxFromRow() unnecessary

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

dww’s picture

Status: Active » Closed (won't fix)
Related issues: +#3491731: [META] Remove the ability to update modules and themes via authorize.php

Now that #3491731: [META] Remove the ability to update modules and themes via authorize.php and child issues are done, all this code is deprecated and will be removed in D12.