Problem/Motivation
On Drupal 8.9.5, with Upgrade Status 8.x-3.0-alpha1, The link on Varnish Purger module is incorrect on the report list, and also the data in column "DRUPAL.ORG 9-READY" is incorrect.
This is because Varnish Purger project name is "varnish_purge" while the module machine name is "varnish_purger".
I tried in upgrade_status/src/Form/UpgradeStatusForm.php::buildProjectList()
foreach ($projects as $name => $extension) {
$name = $extension->info['project'];
to test if it was enough. Nope, I guess because the key is used elsewhere, maybe a little everywhere in the module.
Steps to reproduce
Proposed resolution
Rely on the "project" key in the .info.yml file if it exists instead of the machine name.
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
gábor hojtsyThe project collector is responsible for collating projects. That already has various code pieces to take the project key when available and propagate the project key from https://git.drupalcode.org/project/upgrade_status/-/blob/8.x-3.x/src/Pro... onwards, such as:
It may be that when we use the resulting data, we wrongly assume that the projects array is keyed by project name, while we should be looking at the
info['project']key which we even backfill for unidentified projects.Comment #3
gábor hojtsyDoes this help? It would be great to have a test module that has a name and project mismatch to ensure this keeps working.
Comment #4
gábor hojtsyComment #5
grimreaperHello,
Thanks for the quick reply!
I confirm that the patch fixes the link on Varnish Purger and the "DRUPAL.ORG 9-READY" column data.
Regards,
Comment #6
gábor hojtsyAdded tests for the link at least by adjusting the project name of one of the tested "contrib" projects. Testing for the available updates data woul be much harder, we are not testing that ATM. Added more comments to the code as well to make sure we don't accidentally regress this.
Passed locally.
Comment #8
gábor hojtsyLanded this, thanks for reporting and testing!
Comment #9
grimreaperThanks!
Glad to help!
Cheers,