composer: Composer fails when installing a dependency of a dependency, but not when the dependency is installed directly.

Composer fails when installing a dependency (Let’s call it package A) that has another dependency (package B). When package B is put in the composer.json of the root package (exactly the same line), everything installs fine.

This is the output composer generates:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for remotecp/common dev-crypto@dev -> satisfiable by remotecp/common dev-crypto.
    - remotecp/common dev-crypto requires asymmetricrypt/asymmetricrypt dev-master@dev -> no matching package found.

(note: remotecp/common is package A and asymmetricrypt/asymmetricrypt is package B)

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 16 (7 by maintainers)

Commits related to this issue

Most upvoted comments

To be more specific: replace “dev-master” with “@dev” inside your “require” and it should work.

@jonursenbach If one of your dependencies (in this case myorg/framework) requires dev packages, they would not get installed in your project. Try adding the dependencies of myorg/framework in your project’s composer.json as well.

@hkdobrev Well that worked, but it seems a bit silly to have to define these dependencies twice. Thanks regardless.

@hkdobrev I don’t understand what you mean.