diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 6911ce0846..d4c7356031 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -4,6 +4,7 @@ Yii Framework 2 Change Log 2.0.47 under development ------------------------ +- Bug #14388: Fixed fixture loading order in output message (manchenkoff) - Bug #16658: Fix file readability check on publishing assets by `yii\web\AssetManager` (manchenkoff) - Bug #15557: Fix empty fields exclusion in safe attributes of `yii\base\Model` (manchenkoff) - Bug #19508: Fix wrong selection for boolean attributes in GridView (alnidok) diff --git a/framework/console/controllers/FixtureController.php b/framework/console/controllers/FixtureController.php index d13c4b7bd3..caba5d271c 100644 --- a/framework/console/controllers/FixtureController.php +++ b/framework/console/controllers/FixtureController.php @@ -15,6 +15,7 @@ use yii\console\Exception; use yii\console\ExitCode; use yii\helpers\Console; use yii\helpers\FileHelper; +use yii\test\Fixture; use yii\test\FixtureTrait; /** @@ -157,7 +158,7 @@ class FixtureController extends Controller $this->unloadFixtures($fixturesObjects); $this->loadFixtures($fixturesObjects); - $this->notifyLoaded($fixtures); + $this->notifyLoaded($fixturesObjects); return ExitCode::OK; } @@ -247,13 +248,20 @@ class FixtureController extends Controller /** * Notifies user that fixtures were successfully loaded. - * @param array $fixtures + * @param Fixture[] $fixtures array of loaded fixtures */ private function notifyLoaded($fixtures) { $this->stdout("Fixtures were successfully loaded from namespace:\n", Console::FG_YELLOW); $this->stdout("\t\"" . Yii::getAlias($this->namespace) . "\"\n\n", Console::FG_GREEN); - $this->outputList($fixtures); + + $fixtureClassNames = []; + + foreach ($fixtures as $fixture) { + $fixtureClassNames[] = $fixture::className(); + } + + $this->outputList($fixtureClassNames); } /**