How to avoid dependency dependencies in Composer?

2

I have a project A that has a dependency on project B which, in turn, has a dependency on project C.

So, the dependency graph looks like this:

A -> B -> C

(ps: all projects are developed internally).

However, in composer.json of project A, I am required to require both dependencies:

{
    "require": {
        "B": "dev-master",
        "C": "dev-master"
    }
}

... while in project B, I only require dependency C:

{
    "require": {
        "C": "dev-master"
    }
}

How do I make project A require only dependency B?

Thank you!

    
asked by anonymous 04.09.2015 / 15:16

1 answer

0

I have resolved. I can only do what I want by referencing a project tag, not by referencing dev-master :

{
    "require": {
        "C": "1.*"
    }
}
    
19.11.2015 / 16:36