yii2mod / base

Yii2 application template
MIT License
53 stars 15 forks source link

Installation/Running Migrations #45

Closed juppwerner closed 6 years ago

juppwerner commented 6 years ago

When running "yii migrate", I get this error:

Yii Migration Tool (based on Yii v2.0.14.2)

PHP Warning 'yii\base\ErrorException' with message 'strncmp() expects parameter 1 to be string, array given'

in C:\xampp\htdocs\test\yii2mod-app\vendor\yiisoft\yii2\BaseYii.php:133

Stack trace:

0 C:\xampp\htdocs\test\yii2mod-app\vendor\cyberz\yii2-multipath-migrations\src\controllers\MigrationsController.php(57): yii\BaseYii::getAlias()

1 C:\xampp\htdocs\test\yii2mod-app\vendor\cyberz\yii2-multipath-migrations\src\controllers\MigrationsController.php(28): cyberz\migrations\controllers\MigrationsController->lookupMigrations()

2 C:\xampp\htdocs\test\yii2mod-app\vendor\yiisoft\yii2\console\controllers\BaseMigrateController.php(166): cyberz\migrations\controllers\MigrationsController->getNewMigrations()

...

I was able to fix these two lines in at line 55 in vendor\cyberz\yii2-multipath-migrations\src\controllers\MigrationsController.php:` foreach ($this->migrationLookup as $migrationPath) { if(is_array($migrationPath) and count($migrationPath)==1) // NEW $migrationPath = $migrationPath[0]; // NEW $basePath = Yii::getAlias($migrationPath);

Regards Joachim

ihorchepurnyi commented 6 years ago

Hi, can you try to install the latest version of this package? I installed this app with docker yesterday and all functionality was worked.

ihorchepurnyi commented 6 years ago

Also, you can check Travis, all tests were passed.

ihorchepurnyi commented 6 years ago

Try to install this app via the following instruction