3

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?

2

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, privacy policy and cookie policy

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