When installed yii2 advanced template collided with the "migrate" problem. After db creating I tried run yii migrate but receive this exception:
'yii\base\InvalidCallException' with message 'Setting read-only property: yii\console\Application::db'
I don't know why it happens, because config are OK and I can work with db through shell or dBeaver. OS Linux Mint. Thanks for help.
Console command "/usr/bin/php /var/www/html/advanced/yii migrate".
console/config/main-local.php:
return [
'bootstrap' => ['gii'],
'modules' => [
'gii' => 'yii\gii\Module',
],
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=yii2advanced',
'username' => 'root',
'password' => 'pw',
'charset' => 'utf8',
],
];