Please apply new {project}:{module} format for dependencies in info.yml filehttps://www.drupal.org/docs/8/creating-custom-modules/let-drupal-8-know-about-your-module-with-an-infoyml-file

It is supported since 8.0 and 7.40 Change Record: Project namespaces can now be added for module dependencies, and is now a Best Practice Define project dependencies in core module .info files).

It is useful to install/update via composer. So sooner is better.
Hope this helps.

Comments

chipway created an issue. See original summary.

chipway’s picture

Assigned: chipway » Unassigned
Status: Needs work » Needs review
StatusFileSize
new933 bytes

Here is the patch. Please review.

alonaoneill’s picture

Status: Needs review » Reviewed & tested by the community

Code looks good. The dependency namespacing aligns with Drupal documentation standards.
Patch applied via simplytest.me
Marking as RTBC
Thank you for working on module!

johnpicozzi’s picture

I think this issue is preventing the update to 1.17 via composer. I get the following when trying to update via composer.

Problem 1
    - drupal/contact_emails 1.17.0 requires drupal/contact-contact * -> no matching package found.
    - drupal/contact_emails 1.x-dev requires drupal/contact-contact * -> no matching package found.
    - Installation request for drupal/contact_emails ^1.17 -> satisfiable by drupal/contact_emails[1.x-dev, 1.17.0].
scott_euser’s picture

I don't have access to a laptop at the moment but looking at this thread it seems they previously had the same issue:
https://www.drupal.org/project/redirect/issues/2795709

Comment #25 suggests to clear composer caches to solve.

Comment #23 has a simple workaround from your main composer.json just to get the update to happen (after which you can remove as you'll then have the updated info file matching the new standard). Would suggest just trying #25 from there first.

composer clear-cache

Let me know if that solves it.

johnpicozzi’s picture

@scott_euser - The replace works to get it installed. However, I think it would be better to fix the composer info on d.o so that this isn't needed. Similar to what they say in comment #25 on the Redirect issue.

scott_euser’s picture

Absolutely agree if course. Will need to wait until I get access to my laptop again. My work laptop is in repair so using my personal one for that and I do these modules as a volunteer in my free time sorry.

scott_euser’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

labboy0276’s picture

Status: Fixed » Needs review
StatusFileSize
new320 bytes

While adding this to composer does bandaid the problem:

"replace": {
    "drupal/contact-contact": "*"
 }

The real problem is in the info.yml file. You have the dependency listed as contact:contact, there is no contact contrib module. I checked your dev module from yesterday and it is still there. Sorry to move this from fixed to needs review. Here is a patch to address the problem.

  • scott_euser committed 630e712 on 8.x-1.x authored by labboy0276
    Issue #3000315 by chipway, labboy0276, scott_euser: Update Dependencies...
scott_euser’s picture

Status: Needs review » Fixed

Thanks!

johnpicozzi’s picture

FWIW - I can confirm this is fixed and composer update is working as it should!

Status: Fixed » Closed (fixed)

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