Follow-up to #2774395: Added composer.json with library support.

The composer.json that was added in the parent issue contains a custom repository which name is not lowercased.
On most Unix systems, composer tries to find dependency using the lowercased name which does not exists so the composer require/install/update totally fails. In our case, it even break the CI!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DuaelFr created an issue. See original summary.

DuaelFr’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
552 bytes

Here is the patch. To be commited and released ASAP, please.

  • mehrpadin committed 352b9e2 on 8.x-1.x
    Issue #2829375: Fixing Composer package name and installation path.
    
mehrpadin’s picture

Hey there,

Thanks for all your efforts, could you please check this commit too; this is also to comply with the package naming convention https://www.drupal.org/node/2471927.

DuaelFr’s picture

Hmmmm I think you shouldn't require composer/installer neither override the drupal-library destination.
I'm afraid it could force all the other libraries to be installed in libraries/superfish instead of their own directory...

You can have a look a the Leaflet module that deals with composer for a long time
http://cgit.drupalcode.org/leaflet/tree/composer.json?h=8.x-1.x

hitfactory’s picture

Current composer.json file in latest dev still results in "Your requirements could not be resolved to an installable set of packages".

The repositories, require and extra sections should be removed as declaring packages this way only works from the root composer.json file.

Colorbox had the same troubles. See the following comments.

https://www.drupal.org/node/2714631#comment-11700821
https://www.drupal.org/node/2814045#comment-11760911

Seems the better solution is to include instructions for downloading the Superfish library with composer in README.txt.

DuaelFr’s picture

Status: Needs review » Fixed
Related issues: +#2839024: Require library sanely

I created a follow-up to address that dependency issue : #2839024: Require library sanely

Status: Fixed » Closed (fixed)

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