diff --git a/framework/core/src/Extension/ExtensionManager.php b/framework/core/src/Extension/ExtensionManager.php index 54ffc008c..69ab289d9 100644 --- a/framework/core/src/Extension/ExtensionManager.php +++ b/framework/core/src/Extension/ExtensionManager.php @@ -219,6 +219,7 @@ class ExtensionManager * * @param Extension $extension * @param bool|true $up + * @return array Notes from the migrator. */ public function migrate(Extension $extension, $up = true) { @@ -234,7 +235,11 @@ class ExtensionManager } else { $this->migrator->reset($migrationDir, $extension); } + + return $this->migrator->getNotes(); } + + return []; } /** diff --git a/framework/core/src/Update/Console/MigrateCommand.php b/framework/core/src/Update/Console/MigrateCommand.php index e345beeca..1f2c62f83 100644 --- a/framework/core/src/Update/Console/MigrateCommand.php +++ b/framework/core/src/Update/Console/MigrateCommand.php @@ -69,8 +69,6 @@ class MigrateCommand extends AbstractCommand $extensions = $this->container->make('Flarum\Extension\ExtensionManager'); - $migrator = $extensions->getMigrator(); - foreach ($extensions->getExtensions() as $name => $extension) { if (! $extension->isEnabled()) { continue; @@ -78,9 +76,9 @@ class MigrateCommand extends AbstractCommand $this->info('Migrating extension: '.$name); - $extensions->migrate($extension); + $notes = $extensions->migrate($extension); - foreach ($migrator->getNotes() as $note) { + foreach ($notes as $note) { $this->info($note); } }