Skip to content

Commit

Permalink
Merge branch 'master' of github.com:yiisoft/yii2-mongodb
Browse files Browse the repository at this point in the history
  • Loading branch information
klimov-paul committed Jun 7, 2017
2 parents a18642b + 6e149bb commit e2a689c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Yii Framework 2 mongodb extension Change Log
- Bug #205: Fixed negative value passed to `yii\mongodb\Query::limit()` or `yii\mongodb\Query::offset()` does not disables query limit or offset correspondingly (klimov-paul)
- Bug #207: Fixed `yii\mongodb\validators\MongoDateValidator` corrupts date value, while validating existing `MongoDB\BSON\UTCDateTime` instance (klimov-paul)
- Bug #210: Fixed `yii\mongodb\debug\MongoDbPanel` overrides explain action of `yii\debug\panels\DbPanel` (Liv1020, klimov-paul)

- Bug #213: Made `MigrateController` compatible with Yii 2.0.12 (cebe)

2.1.3 February 15, 2017
-----------------------
Expand Down
14 changes: 10 additions & 4 deletions console/controllers/MigrateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,16 @@ public function beforeAction($action)
*/
protected function createMigration($class)
{
$class = trim($class, '\\');
if (strpos($class, '\\') === false) {
$file = $this->migrationPath . DIRECTORY_SEPARATOR . $class . '.php';
require_once($file);
// since Yii 2.0.12 includeMigrationFile() exists, which replaced the code below
// remove this construct when composer requirement raises above 2.0.12
if (method_exists($this, 'includeMigrationFile')) {
$this->includeMigrationFile($class);
} else {
$class = trim($class, '\\');
if (strpos($class, '\\') === false) {
$file = $this->migrationPath . DIRECTORY_SEPARATOR . $class . '.php';
require_once($file);
}
}

return new $class(['db' => $this->db]);
Expand Down

0 comments on commit e2a689c

Please sign in to comment.