0

When I want to install Drupal Commerce using Composer via Git Bash terminal and using the following command:

$ composer create-project drupalcommerce/project-base mystore --stability dev

I get the following error:

[InvalidArgumentException] Could not find package drupalcommerce/project-base with stability dev in a version installable using your PHP version 5.6.40.

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [] [] []

So what can I do?

0

1 Answer 1

5

The package that triggers the error is drupalcommerce/project-base. If you check the composer information for that package you see:

  "require": {
        "php": ">=7.0.8",
        "ext-curl": "*",
        "composer/installers": "^1.2",
        "cweagans/composer-patches": "^1.6.5",
        [...]

As you see, it requires PHP 7.0.8 or higher. You have PHP 5.6.40. You should upgrade your PHP, not only because this package but also because PHP 7.x is much faster and PHP 5.6 is not recommended anymore, not to forget that PHP 5.6 end of life was hit a year ago, on the beginning of 2019.

3
  • Guess what, 7.0.8 is no longer supported either. php.net/supported-versions.php
    – No Sssweat
    Commented Dec 1, 2019 at 16:55
  • @NoSssweat, that's right. Even 7.1 is deprecated: twitter.com/krakjoe/status/1201010799034195968.
    – sanzante
    Commented Dec 2, 2019 at 7:52
  • 1
    For best performance and future maintenance, always use the newest PHP you can find. Drupal 9 and Commerce 3.x, scheduled for the second half of 2020 will require PHP 7.2, so anyone not using 7.2 will need to update again in 6-12 months. Commented Dec 2, 2019 at 10:49

Your Answer

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

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