Problem/Motivation

The webprofiler submodule has two external dependencies, yet devel's composer.json does not list them. Instead of requiring these packages in devel's composer.json, users are asked in webprofiler/README.md to manually run extra composer commands and make a series of manual edits to their project's composer.json file.

Proposed resolution

Move the project's dependencies out of the README and into devel's root composer.json (not webprofiler's composer.json because, as this similar issue outlines, "...only [the] top level composer.json is registered by packagist").

Documentation on how is here:
https://www.drupal.org/docs/8/creating-custom-modules/add-a-composerjson...

Remaining tasks

- Patch
- Review

User interface changes

Easier install / all dependencies pulled in via composer require drupal/drush.

API changes

None.

Data model changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chrisolof created an issue. See original summary.

moshe weitzman’s picture

Status: Active » Closed (duplicate)
chrisolof’s picture

Patch attached.

@moshe weitzman I wasn't able to find a duplicate of this - though I found some related support-request type issues opened and subsequently closed where users struggled to manually install the webprofiler dependencies after installing devel. None of those seemed to address the problem at what I believe to be its source: Moving dependencies out of the readme and into composer.json.

Would you rather I re-open and post this patch into one of those issues? If so just let me know which one you'd prefer.

If not, then do you have any feedback on the approach / patch?

Status: Needs review » Needs work
moshe weitzman’s picture

Sorry for closing this prematurely.

Without any other configuration, these libraries are going to download to vendor and be unusuble by the site, right? I suspect thats why this is still an open issue.

chrisolof’s picture

Status: Needs work » Closed (works as designed)
Related issues: -#2849886: Composer dependencies for submodules should be added to parent composer.json

You are absolutely right. I thought things were further along with library dependencies than they actually are. I guess the only way to declare a library dependency in a Drupal module, presently, is by way of outlining manual steps in the readme. It would be cool if that changed someday. Anyway sorry for the noise - appreciate the clarification. Closing.