TransWikia.com

Craft 3.6 Upgrade errors - can only install one of yiisoft/yii2 (and other errors)

Craft CMS Asked on April 22, 2021

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');""
    ]
  }
}

One Answer

I found the fix here

composer install --ignore-platform-reqs

Answered by doctorgloom on April 22, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP