From e478c23bd42bef487b39a9e7fb6444624da94c1a Mon Sep 17 00:00:00 2001 From: DarkDef Date: Wed, 1 Jul 2020 00:52:52 +0300 Subject: [PATCH] Fix #17985: Convert migrationNamespaces to array if needed Co-authored-by: Alexander Makarov --- framework/CHANGELOG.md | 1 + framework/console/controllers/BaseMigrateController.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 2acef5a..48b5131 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -24,6 +24,7 @@ Yii Framework 2 Change Log - Enh #18120: Include path to the log file into error message if `FileTarget::export` fails (uaoleg) - Enh #15202: Add optional param `--silent-exit-on-exception` in `yii\console\Controller` (egorrishe) - Bug #18110: Add quotes to return value of viewName in MSSQL schema. It is `[someView]` now (darkdef) +- Bug #17985: Convert migrationNamespaces to array if needed (darkdef) 2.0.35 May 02, 2020 diff --git a/framework/console/controllers/BaseMigrateController.php b/framework/console/controllers/BaseMigrateController.php index 93c29d1..561d6bd 100644 --- a/framework/console/controllers/BaseMigrateController.php +++ b/framework/console/controllers/BaseMigrateController.php @@ -119,6 +119,8 @@ abstract class BaseMigrateController extends Controller throw new InvalidConfigException('At least one of `migrationPath` or `migrationNamespaces` should be specified.'); } + $this->migrationNamespaces = (array) $this->migrationNamespaces; + foreach ($this->migrationNamespaces as $key => $value) { $this->migrationNamespaces[$key] = trim($value, '\\'); }