diff --git a/framework/core/src/Console/Server.php b/framework/core/src/Console/Server.php index f63d2d7e6..32fe3e29f 100644 --- a/framework/core/src/Console/Server.php +++ b/framework/core/src/Console/Server.php @@ -30,12 +30,12 @@ class Server extends AbstractServer { $app = $this->getApp(); - $console = new Application('Flarum', $app::VERSION); + $console = new Application('Flarum', $app->version()); $app->register('Flarum\Install\InstallServiceProvider'); $console->add($app->make('Flarum\Install\Console\InstallCommand')); - $console->add($app->make('Flarum\Console\Command\UpgradeCommand')); + $console->add($app->make('Flarum\Update\Console\MigrateCommand')); $console->add($app->make('Flarum\Console\Command\GenerateExtensionCommand')); $console->add($app->make('Flarum\Console\Command\GenerateMigrationCommand')); diff --git a/framework/core/src/Database/MigrationCreator.php b/framework/core/src/Database/MigrationCreator.php index 64f52f217..ce871807b 100755 --- a/framework/core/src/Database/MigrationCreator.php +++ b/framework/core/src/Database/MigrationCreator.php @@ -92,8 +92,10 @@ class MigrationCreator */ protected function populateStub($extension, $name, $stub, $table) { + list($vendor, $package) = explode('-', $extension, 2); + $replacements = [ - '{{namespace}}' => Str::studly($extension) ?: 'Flarum\Core', + '{{namespace}}' => Str::studly($vendor).'\\'.Str::studly($package) ?: 'Flarum\Core', '{{name}}' => Str::studly($name), '{{table}}' => $table ];