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?
Command icon 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

fjgarlin created an issue. See original summary.

tedbow’s picture

I 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_updates not the sub module package_manger(which I think Project Browser will rely on). So we might want to move this logic into package_manger to Project Browser doesn't have to rely on automatic_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

fjgarlin’s picture

Correct @tedbow, project_browser relies on package_manager only. Thanks for creating the related issue on automatic_updates too.

fjgarlin’s picture

Assigned: fjgarlin » Unassigned
Status: Active » Needs review

This 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.

bnjmnm’s picture

Status: Needs review » Reviewed & tested by the community

Seems 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.

tim.plunkett made their first commit to this issue’s fork.

  • tim.plunkett committed 921abb6 on 1.0.x authored by fjgarlin
    Issue #3296250 by fjgarlin, tedbow, bnjmnm: machine_name field might not...
tim.plunkett’s picture

Status: Reviewed & tested by the community » Fixed

Great, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

fjgarlin’s picture

#3309537: Add composer namespace to update status XML has been added to the update xml endpoint.