From 4419b6d6b1031b9bf566bc92c4ff51a1a72654f0 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Tue, 18 Aug 2015 13:56:49 +0930 Subject: [PATCH] Migrate extensions in upgrade script --- framework/core/src/Console/UpgradeCommand.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/framework/core/src/Console/UpgradeCommand.php b/framework/core/src/Console/UpgradeCommand.php index b5abee6dd..fbe4a52d4 100644 --- a/framework/core/src/Console/UpgradeCommand.php +++ b/framework/core/src/Console/UpgradeCommand.php @@ -52,5 +52,19 @@ class UpgradeCommand extends Command foreach ($migrator->getNotes() as $note) { $this->info($note); } + + $extensions = $this->container->make('Flarum\Support\ExtensionManager'); + + $migrator = $extensions->getMigrator(); + + foreach ($extensions->getInfo() as $extension) { + $this->info('Upgrading extension: '.$extension->name); + + $extensions->enable($extension->name); + + foreach ($migrator->getNotes() as $note) { + $this->info($note); + } + } } }