yii2 migration command gives warning how to fix it?

╄→гoц情女王★ 提交于 2019-12-14 04:14:39

问题


I want to download and use thyseus/yii2-message. followed steps on github. for installation

1) $ composer require thyseus/yii2-message
2) $ php yii migrate/up --migrationPath=@vendor/thyseus/yii2-message/migrations

warning

PHP Warning:  Module 'openssl' already loaded in Unknown on line 0

Warning: Module 'openssl' already loaded in Unknown on line 0
Exception 'yii\base\InvalidConfigException' with message 'The configuration for
the "user" component must contain a "class" element.'

in C:\xampp\htdocs\yii2-my-app2\vendor\yiisoft\yii2\di\ServiceLocator.php:204

Stack trace:
#0 C:\xampp\htdocs\yii2-my-app2\vendor\yiisoft\yii2\di\ServiceLocator.php(260):
yii\di\ServiceLocator->set('user', Array)
#1 C:\xampp\htdocs\yii2-my-app2\vendor\yiisoft\yii2\base\Component.php(172): yii
\di\ServiceLocator->setComponents(Array)
#2 C:\xampp\htdocs\yii2-my-app2\vendor\yiisoft\yii2\BaseYii.php(529): yii\base\C
omponent->__set('components', Array)
#3 C:\xampp\htdocs\yii2-my-app2\vendor\yiisoft\yii2\base\Object.php(105): yii\Ba
seYii::configure(Object(yii\console\Application), Array)
#4 C:\xampp\htdocs\yii2-my-app2\vendor\yiisoft\yii2\base\Application.php(205): y
ii\base\Object->__construct(Array)
#5 C:\xampp\htdocs\yii2-my-app2\vendor\yiisoft\yii2\console\Application.php(89):
 yii\base\Application->__construct(Array)
#6 C:\xampp\htdocs\yii2-my-app2\yii(26): yii\console\Application->__construct(Ar
ray)
#7 {main}
PHP Core Warning 'yii\base\ErrorException' with message 'Module 'openssl' alread
y loaded'

in .\Unknown:0

Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleFatalError()
#1 {main}

1st command runs successfully but second command gives some warning I didnt get it? can anyone fix it? and I also want to know what does this migration command exactly do


回答1:


For the warning, check answers to this question. For the error: Yii2-user or another user extension has to be installed first and working.



来源:https://stackoverflow.com/questions/48862736/yii2-migration-command-gives-warning-how-to-fix-it

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!