Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation/Running Migrations #45

Closed
juppwerner opened this issue Mar 18, 2018 · 3 comments
Closed

Installation/Running Migrations #45

juppwerner opened this issue Mar 18, 2018 · 3 comments

Comments

@juppwerner
Copy link

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
Copy link
Contributor

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
Copy link
Contributor

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

@ihorchepurnyi
Copy link
Contributor

Try to install this app via the following instruction

This was referenced Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants