Cms: OutOfBoundsException: Package "yiisoft/yii2" is not installed

Created on 3 Feb 2021  Â·  4Comments  Â·  Source: craftcms/cms

Description

After updating to 3.6.2, the /utilities/system-report throws an error suggesting that the "yiisoft/yii2"-package is not installed. The vendor-directory seems present and everything else is working just fine.

2021-02-03 17:19:46 [-][49894][0mjeb4ncp7q6kmbv2cdn0cpokb][error][OutOfBoundsException] OutOfBoundsException: Package "yiisoft/yii2" is not installed in /.../vendor/composer/composer/src/Composer/InstalledVersions.php:127
Stack trace:
#0 /.../vendor/craftcms/cms/src/utilities/SystemReport.php(115): Composer\InstalledVersions::getPrettyVersion('yiisoft/yii2')
#1 /.../vendor/craftcms/cms/src/utilities/SystemReport.php(84): craft\utilities\SystemReport::_appInfo()
#2 /.../vendor/craftcms/cms/src/controllers/UtilitiesController.php(85): craft\utilities\SystemReport::contentHtml()
#3 [internal function]: craft\controllers\UtilitiesController->actionShowUtility('system-report')
#4 /.../vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#5 /.../vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array)
#6 /.../vendor/craftcms/cms/src/web/Controller.php(190): yii\base\Controller->runAction('show-utility', Array)
#7 /.../vendor/yiisoft/yii2/base/Module.php(534): craft\web\Controller->runAction('show-utility', Array)
#8 /.../vendor/craftcms/cms/src/web/Application.php(274): yii\base\Module->runAction('utilities/show-...', Array)
#9 /.../vendor/yiisoft/yii2/web/Application.php(104): craft\web\Application->runAction('utilities/show-...', Array)
#10 /.../vendor/craftcms/cms/src/web/Application.php(259): yii\web\Application->handleRequest(Object(craft\web\Request))
#11 /.../vendor/yiisoft/yii2/base/Application.php(392): craft\web\Application->handleRequest(Object(craft\web\Request))
#12 /.../web/index.php(38): yii\base\Application->run()
#13 {main}

Additional info

  • Craft version: 3.6.2
  • PHP version: 7.2.24
  • Database driver & version: MySQL 5.5.68
  • Plugins & versions: various
bug

Most helpful comment

We managed to track this down, and have fixed it for the next release!

To get the fix early, change your craftcms/cms requirement in composer.json to "dev-develop as 3.6.3"and run composer update.

All 4 comments

Strange… are you doing anything special in composer.json?

Apart from Craft and some plugins, I can't say we're doing anything special in our composer.json. We are updating our 3.5 sites to 3.6 this week and are experiencing this issues on various updated sites.

{
    "require": {
        "php": "^7.2",
        "ext-curl": "*",
        "ext-json": "*",
        "clubstudioltd/craft-asset-rev": "6.0.2",
        "craftcms/aws-s3": "1.2.11",
        "craftcms/cms": "3.6.2",
        "craftcms/contact-form": "2.2.7",
        "craftcms/redactor": "2.8.5",
        "diginov/craft-sentry-logger": "^1.1",
        "fruitstudios/linkit": "1.1.12.1",
        "hybridinteractive/craft-contact-form-extensions": "1.2.4",
        "hybridinteractive/craft-position-fieldtype": "1.0.16",
        "nystudio107/craft-seomatic": "3.3.30",
        "spicyweb/craft-neo": "2.8.18",
        "studioespresso/craft-dumper": "2.0.0",
        "tde/asset-placeholder": "@dev",
        "tde/craft-cacheable": "^1.0",
        "tde/craft-environment": "^2.1",
        "tde/craft-environmentloader": "1.0.5",
        "tde/craftplugin-branding": "2.1.2",
        "verbb/expanded-singles": "1.1.3",
        "vlucas/phpdotenv": "4.1.0"
    },
    "autoload": {
        "psr-4": {
            "modules\\": "modules/"
        }
    },
    "config": {
        "sort-packages": true,
        "optimize-autoloader": true,
        "platform": {
            "php": "7.2.5"
        }
    },
    "scripts": {
        "post-create-project-cmd": [
            "@composer dump-autoload -o",
            "@php craft setup/welcome"
        ]
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "[email protected]...:tdeNL/craft-environmentloader.git"
        },
        {
            "type": "vcs",
            "url": "[email protected]...:tdeNL/craft-cacheable.git"
        },
        {
            "type": "vcs",
            "url": "[email protected]...:craft-plugins/asset-placeholder.git"
        }
    ]
}

We managed to track this down, and have fixed it for the next release!

To get the fix early, change your craftcms/cms requirement in composer.json to "dev-develop as 3.6.3"and run composer update.

Craft 3.6.4 is out now with that fix ✨

Was this page helpful?
0 / 5 - 0 ratings