drupal-composer / drupal-packagist

:package: Drupal Packagist server to automatically build package information from projects on drupal.org
http://packagist.drupal-composer.org
28 stars 4 forks source link

Dev version in composer.json is pulling in the latest, non-dev version. #28

Closed andrewholgate closed 9 years ago

andrewholgate commented 9 years ago

Following the instructions to install the Web Profiler a dependency, I add the following to the composer.json file:

"drupal/webprofiler": "8.1.*@dev"

When I then install via composer, the version which is downloaded appears to be the latest non-dev version (8.1.1-beta9 in this case)

From the downloaded info file (webprofiler.info.yml):

version: '8.x-1.1-beta9'
core: '8.x'
project: 'webprofiler'
datestamp: 1427355495
andrewholgate commented 9 years ago

I resolved the issue, I found that in composer.json in Drupal Project had been configured to be "prefer-stable": true, which will mean it will pull in a stable version if it is available (rather than the dev version).

To force the download of the dev version (even with prefer-stable set to true), dependencies have to be explicitly declared in the composer.json file.

Eg. They need to be declared as "drupal/webprofiler": "8.x-1.x-dev" Rather than "drupal/webprofiler": "8.1.*@dev"

webflo commented 9 years ago

Great :)