Correct project names in module dependencies
andriokha opened this issue · comments
I recently went through an upgrade and noticed that node revision delete wasn't enabled despite being a dependency. Tbh I don't know that this is the culprit, but I noticed that the dependencies aren't right in the .info.yml
- they all have the project name as drupal
. (I do it all the time myself, it's so hard when in composer it's drupal/node_revision_delete
!)
Lines 7 to 15 in 93c25fa
Thanks!
It's all correct @andriokha
See https://ds-docs.y.org/docs/wiki/dependencies-in-drupal-info.yml/
Let us know what issue you faced with?
Thanks for your time @podarok!
It's all correct @andriokha
See https://ds-docs.y.org/docs/wiki/dependencies-in-drupal-info.yml/
Ah, that goes against my understanding of the .info.yml
file dependencies. To quote d.o.:
Dependencies on Drupal core or contrib modules should be namespaced in the format
{project}:{module}
, where{project}
is the project name as it appears in the Drupal.org URL (e.g. drupal.org/project/paragraphs) and{module}
is the module's machine name.
And the example they give
dependencies: - drupal:link - drupal:views - paragraphs:paragraphs - webform:webform (>=6.1.0)
Let us know what issue you faced with?
The original issue that made me look was that node_revision_delete
wasn't enabling, but that's fixed by #60 as far as I can tell.
Thanks again!
Thanks for your time @podarok!
It's all correct @andriokha
See https://ds-docs.y.org/docs/wiki/dependencies-in-drupal-info.yml/Ah, that goes against my understanding of the
.info.yml
file dependencies. To quote d.o.:Dependencies on Drupal core or contrib modules should be namespaced in the format
{project}:{module}
, where{project}
is the project name as it appears in the Drupal.org URL (e.g. drupal.org/project/paragraphs) and{module}
is the module's machine name.And the example they give
dependencies: - drupal:link - drupal:views - paragraphs:paragraphs - webform:webform (>=6.1.0)Let us know what issue you faced with?
The original issue that made me look was that
node_revision_delete
wasn't enabling, but that's fixed by #60 as far as I can tell.Thanks again!
On drupal.org also people ;)
People make mistakes ;)
Thank YOU
Yes, this is incorrect
I'm not sure it matters, but I can't find any corroboration that the first string should always be drupal
(for one thing, it seems a bit redundant). As well as the quoted docs, if you look at eg. \Drupal\Core\Extension\Dependency::createFromString()
which parses a dependency string, it extracts the first part as the project. In a unit test it has an example using paragraphs
as the project name. You can also see there are many more examples in the wild of paragraphs:paragraphs
than drupal:paragraphs
(with at least 8 of the latter come from YMCA-WS). As I say I'm not sure where it might cause actual problems, but it does seem that the issue is valid 🤷 :)
@froboy as a resolution, just to ensure no confusion
#56 (comment)
Since I put this https://ds-docs.y.org/docs/wiki/dependencies-in-drupal-info.yml/ doc nothing really changed in composer repo on drupal.org
So following this document is a preferable way for us