命名空间冲突
This commit is contained in:
parent
b755061b36
commit
413b7d83e1
|
@ -140,12 +140,14 @@ abstract class Migrate extends Command
|
||||||
$fileNames[$class] = basename($filePath);
|
$fileNames[$class] = basename($filePath);
|
||||||
|
|
||||||
// load the migration file
|
// load the migration file
|
||||||
/** @noinspection PhpIncludeInspection */
|
|
||||||
require_once $filePath;
|
require_once $filePath;
|
||||||
if (!class_exists($class)) {
|
if (!class_exists($class)) {
|
||||||
throw new InvalidArgumentException(sprintf('Could not find class "%s" in file "%s"', $class, $filePath));
|
if (!class_exists('database\\migrations\\' . $class)) {
|
||||||
|
throw new InvalidArgumentException(sprintf('Could not find class "%s" in file "%s"', $class, $filePath));
|
||||||
|
} else {
|
||||||
|
$class = 'database\\migrations\\' . $class;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// instantiate it
|
// instantiate it
|
||||||
$migration = new $class($version, $this->input, $this->output);
|
$migration = new $class($version, $this->input, $this->output);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user