5

Perhaps a stupid question but: Why does Magento 2 composer.json require Composer?

If you look at the composer.json (either of the GitHub repo or the composer.json bundled with the downloaded archive from magento.com), you'll see something like:

"require": {
 ...
 "composer/composer": "@alpha"
 ...
}

or:

"require": {
 ...
 "composer/composer": "1.4.1"
 ...
}

So my question basically is: Why would Magento (or any given Composer project) require composer itself? I mean: You typically should already have installed composer on your system as a global library. So why include it then?

sv3n
11.7k7 gold badges44 silver badges75 bronze badges
asked Sep 15, 2017 at 7:34

1 Answer 1

3

Most likely because the Magento composer installer which is part of the Magento composer meta package needs a specific version and this way it has access to the code.

answered Oct 25, 2017 at 10:50

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.