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

后端 未结 1 1458
我在风中等你
我在风中等你 2021-01-29 01:27

Error > while login or signup using yii2+ mongodb gives an error.

MongoDB connection with yii2 is done. please help me to solve this problem.

m

相关标签:
1条回答
  • 2021-01-29 02:06

    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',
             )
         ),
    
    0 讨论(0)
提交回复
热议问题