This is a minor fix

I have been following some recent overnight changes to the examples module and noticed that they have started to namespace their dependencies.

Here is the relevant documentation

https://www.drupal.org/docs/8/creating-custom-modules/let-drupal-8-know-...

From which is see the following quote suggesting that the proper format is {project}:{module}

dependencies - A list of other modules your module depends on. Dependencies should be namespaced in the format: {project}:{module} where {project} is the project name as it appears in the Drupal.org url (i.e: drupal.org/project/views) and {module} is the module's machine name.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

martin107 created an issue. See original summary.

martin107’s picture

martin107’s picture

Status: Active » Needs review
joachim’s picture

Status: Needs review » Needs work
+++ b/modules/flag_follower/flag_follower.info.yml
@@ -4,6 +4,6 @@ core: 8.x
+  - drupa:node

Typo ;)

Berdir’s picture

+++ b/modules/flag_bookmark/flag_bookmark.info.yml
@@ -4,6 +4,6 @@ core: 8.x
 dependencies:
   - flag
-  - views
-  - node
+  - drupal:views
+  - drupal:node
 package: Flags

Why not update flag to flag:flag while you touch it?

martin107’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
1.09 KB

Thank you both

So before I submitted I was paranoid enough to manually test both submodules,

drush en flag_bookmark
drush en flag_followers

but my inability to spell drupal correctly has left me even more paranoid -- as something in core or drush let me install a module with unmeetable dependencies!

Berdir’s picture

Status: Needs review » Needs work

That's because drupal itself doesn't care about projects, they don't exist at runtime, so it basically just drops whatever project definition you have in there. So drupal:node will install, drupa:node will install, foo:node will install... drupal:nod will not.

Looks like you added a submodule reference to the patch now :)

martin107’s picture

Such a short patch, with so many corrections ... it must be Monday

Thanks for the clarification and keeping me honest Bedir

socketwench’s picture

Status: Needs review » Reviewed & tested by the community

Ran install locally, no issues!

  • joachim committed 1ccf30b on 8.x-4.x authored by martin107
    Issue #2843798 by martin107: Updated module dependencies to use project...
joachim’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks everyone!

Status: Fixed » Closed (fixed)

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