Skip to content

Instantly share code, notes, and snippets.

@heiglandreas
Created May 10, 2016 11:09
Show Gist options
  • Save heiglandreas/a3aba9c0e8baba3b2443f44322beeffe to your computer and use it in GitHub Desktop.
Save heiglandreas/a3aba9c0e8baba3b2443f44322beeffe to your computer and use it in GitHub Desktop.
How to install a dependency that depends on a dev-dependency

The issue:

Given a project that has the minimum-stability set to "stable" and a dependency of the project - itselv being stable - has a dependency to a dev-version of a lib.

How can one use composer require to install that lib without having to prepare the composer.json before by adding the dependencies dependency as @dev as described here.

As an example you can use the given composer.json and shell-command to test that issue. But it does not seem to be limited to that case.

{
"require" : {
"zendframework/zendframework" : "^2.5"
}
}
composer require org_heigl/hybridauth
composer require org_heigl/hybridauth:dev
composer require org_heigl/hybridauth:@dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment