T
T
T4-1002014-08-05 21:35:15
PHP
T4-100, 2014-08-05 21:35:15

Can I have multiple require sections in composer.json?

Can I have multiple require sections in composer.json? Or is it necessary to create multiple composer.json files? Then how does the composer install command understand which json file to use?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Osher, 2014-08-05
@miraage

Can.

{
    "require": {
        "vendorfoo/lib1": "1.2.1",
        "vendorbar/lib2": "0.1.2"
    }
}

A
Alexander Zelenin, 2014-08-06
@zelenin

It is forbidden.
Do not ask "is it possible", ask: I want to do this, I thought that I can implement it this way, right?
Why do you need multiple sections? Looks like bullshit.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question