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?

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.