Object configuration must be an array containing a “class” element in yii2 with mongodb

浪子不回头ぞ 提交于 2019-12-02 08:59:26

Check your vendor\yiisoft\extension.php I had the same error after I had installed one package which add uncorrect config array to the file vendor\yiisoft\extension.php

'tigrov/yii2-country' =>
     array (
        'name' => 'tigrov/yii2-country',
        'version' => '9999999-dev',
        'alias' =>
         array (
           '@tigrov/country' => $vendorDir . '/tigrov/yii2-country/src',
         ),
        'bootstrap' => 'tigrov\\country\\Bootstrap',
     ),

I've changed the previous one to the next one (just wrapped bootstrap in array)

'tigrov/yii2-country' =>
     array (
        'name' => 'tigrov/yii2-country',
        'version' => '9999999-dev',
        'alias' =>
         array (
            '@tigrov/country' => $vendorDir . '/tigrov/yii2-country/src',
         ),
         array(
            'bootstrap' => 'tigrov\\country\\Bootstrap',
         )
     ),
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!