1

I'm new to Craft so maybe I'm doing something dumb, but I can't get past this error screen when trying to update to 3.6:

Composer output: Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1

  • Can only install one of: yiisoft/yii2[2.0.38, 2.0.40].
  • Can only install one of: yiisoft/yii2[2.0.40, 2.0.38].
  • craftcms/cms 3.6.5.1 requires yiisoft/yii2 ~2.0.40.0 -> satisfiable by yiisoft/yii2[2.0.40].
  • Installation request for craftcms/cms 3.6.5.1 -> satisfiable by craftcms/cms[3.6.5.1].
  • Installation request for yiisoft/yii2 (installed at 2.0.38) -> satisfiable by yiisoft/yii2[2.0.38].

Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.

I deleted the composer.lock file based on some threads I found here, and I tried running composer update from the terminal and it did reduce a much longer error message down to this one, but still no joy.

I'm developing locally on MAMP, 3.5.x was running great.

My composer.json:

{
  "require": {
    "craftcms/cms": "3.5.18",
    "craftcms/contact-form": "2.2.7",
    "craftcms/feed-me": "4.3.4",
    "craftcms/mailgun": "1.4.3",
    "craftcms/redactor": "2.8.5",
    "vlucas/phpdotenv": "^3.4.0"
  },
  "require-dev": {
    "yiisoft/yii2-shell": "^2.0.3"
  },
  "autoload": {
    "psr-4": {
      "modules\\": "modules/"
    }
  },
  "config": {
    "sort-packages": true,
    "optimize-autoloader": true,
    "platform": {
      "php": "7.2.5"
    }
  },
  "scripts": {
    "post-root-package-install": [
      "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ]
  }
}
doctorgloom
  • 341
  • 1
  • 8
  • If you put a ^ in front of all of the dependencies (i.e. "craftcms/cms": "^3.5.18", "craftcms/contact-form": "^2.2.7",, etc.) then run composer update, does that help? – Brad Bell Feb 13 '21 at 00:37
  • Tried but now I'm getting the error: Install or enable PHP's zip extension. Quick search suggests it's not available on MAMP I guess, so maybe that's the problem? – doctorgloom Feb 13 '21 at 00:54
  • Just found the fix: composer install --ignore-platform-reqs – doctorgloom Feb 13 '21 at 01:02

1 Answers1

2

I found the fix here

composer install --ignore-platform-reqs

doctorgloom
  • 341
  • 1
  • 8