Project name and Module name not matching up problem in composer

Events happening in the community are now at Drupal community events on www.drupal.org.
generalredneck's picture

I don't expect a lot of feedback, however, I thought that I would post this here, so that it gets more visibility.

I've turned this into a blog post over here.

Literally, I wanted to convey that, if you are having problems with a specific module is required that has a package with a different name. For example in this error:

Problem 1
    - drupal/api 7.1.9 requires drupal/gplib >=7.2.1, <7.3.0 -> no matching package found.

You can use the name of the project for the package and it "replaces" any modules that are within the package. So in this case, requiring drupal/grammar_parser_lib will do the trick.

composer show drupal/grammar_parser_lib
name     : drupal/grammar_parser_lib
descrip. :
keywords :
versions : 7.2.x-dev, * 7.2.1, 7.2.0, 7.1.x-dev, 7.1.1, 7.1.0, dev-7.x-2.x, dev-7.x-1.x
type     : drupal-module
license  :
source   : [git] http://git.drupal.org/project/grammar_parser_lib 360ea65a8bf46945ca2c9ab279960c82c7315b56
dist     : [zip] http://ftp.drupal.org/files/projects/grammar_parser_lib-7.x-2.1.zip
names    : drupal/grammar_parser_lib, drupal/gplib

requires
drupal/drupal 7.*
drupal/grammar_parser 7.*
drupal/libraries >=7.2.x-dev

replaces
drupal/gplib self.version <----

Comments

I guess we could solve that

derhasi's picture

I guess we could solve that problem in general by introducing metapackages. At least there is an issue for that on https://github.com/drupal-composer/drupal-packagist/issues/15

Just a heads-up about this,

mile23's picture

Just a heads-up about this, as well: https://www.drupal.org/node/2401519 "[policy, no patch] Decide on Composer Package Names"

Composer

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week