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.
Comment | File | Size | Author |
---|---|---|---|
#3 | devel-add-missing-webprofiler-dependencies-2938968-3.patch | 2.48 KB | chrisolof |
Comments
Comment #2
moshe weitzman CreditAttribution: moshe weitzman commentedComment #3
chrisolof CreditAttribution: chrisolof at Lima Solutions for CivicSolar, Inc. commentedPatch 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?
Comment #5
moshe weitzman CreditAttribution: moshe weitzman commentedSorry 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.
Comment #6
chrisolof CreditAttribution: chrisolof at Lima Solutions for CivicSolar, Inc. commentedYou 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.