Problem/Motivation
From @drumm in slack:
Actually, there’s another problem there - project_machine_name is not the Composer namespace, but there are places where it diverges. The Drupal.org API will need to provide the Composer namespace, and that needs to get through all the layers.
So we need to implement a separate field to be consumed by the front-end for the composer namespace, different from the machine_name.
The mock will make this field equals the machine_name, but in a separate field, as this info is not available in D7 api endpoint, but all plugins will need to implement this attribute.
Proposed resolution
Add attribute to projects for composer_namespace.
Remaining tasks
- ✅ File an issue about this project
- ☐ Manual Testing
- ☐ Code Review
- ☐ Accessibility Review
- ☐ Automated tests needed/written?
Issue fork project_browser-3296250
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
tedbowI created #3296261: Add the ability to map package names to project names and vice-versa
which will try solve this problem for Automatic Updates
Right now all the logic for dealing with Update XML lives in
automatic_updatesnot the sub modulepackage_manger(which I think Project Browser will rely on). So we might want to move this logic intopackage_mangerto Project Browser doesn't have to rely onautomatic_updates.For instance Project Browser will have to handle update Drupal projects when you install a new module, or just not allow it. If you allow it then you have to check the Update XML for update dependencies
Comment #3
fjgarlin commentedCorrect @tedbow,
project_browserrelies onpackage_manageronly. Thanks for creating the related issue onautomatic_updatestoo.Comment #5
fjgarlin commentedThis will be a bit more elaborate in the actual www.drupal.org D9 endpoint, but for now, the changes for the front-end to read the new property are in the MR.
As the www.drupal.org D7 cannot provide this information (already asked via slack), we are defaulting to "drupal/MACHINE_NAME", but knowing that this is not 100% accurate in all cases, but good enough for the mock.
Comment #6
bnjmnmSeems straightforward enough: composer namespace is an additional property because it can sometimes be different from the
drupal/the_machine_name, and although we don't currently have a means of getting this different value, the FE code and ProjectInterface are now equipped for when this value is available.Comment #9
tim.plunkettGreat, thanks!
Comment #11
fjgarlin commented#3309537: Add composer namespace to update status XML has been added to the update xml endpoint.