Closed geek-merlin closed 8 years ago
A finding that might or might not be connected:
Debugging shows that package info contains wrong package name, (and i guess this confuses one code path but not the other): This packagist json taken from that and that list for entity_view_mode erroneously has "easy_booking" package keys. Or is this intended?
An explicit way how to run into this:
composer require drupal/ableorganizer:@dev
...
drupal/ableorganizer 7.1.x-dev requires drupal/views_data_export 7.* -> no matching package found.
But there is.
The stability-flags don't work recursive if you require a package. You should add minimum-stability and prefer-stable to your composer.json. We do this by default in D8 but not in D7.
"minimum-stability": "dev",
"prefer-stable": true
I think everything works as intended.
Thanks flo. Of course i added those lines in the root composer.json, so that should not be the problem
Sorry, i don't understand the issue completely. Lets use a concrete example e.g. drupal/easy_booking
.
composer require drupal/easy_booking
fails with the following message.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- drupal/easy_booking 7.2.x-dev requires drupal/fe_block 7.* -> no matching package found.
- drupal/easy_booking 7.2.1 requires drupal/fe_block 7.* -> no matching package found.
- drupal/easy_booking 7.2.0-beta1 requires drupal/fe_block 7.* -> no matching package found.
- drupal/easy_booking 7.2.0-beta requires drupal/fe_block 7.* -> no matching package found.
- Installation request for drupal/easy_booking ^7.2 -> satisfiable by drupal/easy_booking[7.2.0-beta, 7.2.0-beta1, 7.2.1, 7.2.x-dev].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Composer could not install easy_booking
because of the dependency on fe_block
. fe_block
is part of Features Extra. Submodules are not directly available on Drupal Packagist. There are two workarounds i am aware of.
drupal/features_extra
before drupal/easy_booking
in your composer.json (drupal/features_extra contains a replace link and will fulfill the dependency on fe_block)dependencies[] = fe_block
with dependencies[] = features_extra:fe_block
. ("features_extra:" is a Project namespace. This is supported by D7 and Drupal-Packagist. see https://www.drupal.org/node/2299747, https://github.com/drupal-composer/drupal-parse-composer/commit/93cc017a9d8f1c9a54af15da0a349a2eb46df9cd)Yes i understand the problem about infering a project dependency from a module dependency and i'm aware of your #15 as a possible solution. That's not the issue.
So look at the example from my 3rd comment:
composer create-project drupal/drupal-project:7.x@dev test
(now go to test dir and add minimum-stability and prefer-stable)
composer require drupal/ableorganizer:@dev
...
drupal/ableorganizer 7.1.x-dev requires drupal/views_data_export 7.* -> no matching package found.
and note that views_data_export is a project of its own and has a package.
I'm really getting mad at this.
Ok, lets see. https://travis-ci.org/drupal-composer/drupal-project/builds/117525069
Added the two flags by default in https://github.com/drupal-composer/drupal-project/commit/9b60927038e9df97db11f2a1980102a9e76457c6
Urps... when i tried to investigate that further i could not reproduce it in such a simple way. (Typo? Too tired?...) Closing for now, i'll open a cleaner ticket if it comes back. Thanks alas!!
How to reproduce:
foo/bar requires drupal/entity_view_mode 7.*.*@dev -> no matching package found.
What is verrry strange: This succeeds:
composer require "drupal/entity_view_mode:7.*.*@dev"