migrate: Use existing public API to filter extensions

This commit is contained in:
Franz Liedke 2018-09-26 23:03:48 +02:00
parent 7e8279ec04
commit 5610824e96

View File

@ -67,11 +67,7 @@ class MigrateCommand extends AbstractCommand
$extensions = $this->container->make('Flarum\Extension\ExtensionManager'); $extensions = $this->container->make('Flarum\Extension\ExtensionManager');
$extensions->getMigrator()->setOutput($this->output); $extensions->getMigrator()->setOutput($this->output);
foreach ($extensions->getExtensions() as $name => $extension) { foreach ($extensions->getEnabledExtensions() as $name => $extension) {
if (! $extension->isEnabled()) {
continue;
}
$this->info('Migrating extension: '.$name); $this->info('Migrating extension: '.$name);
$extensions->migrate($extension); $extensions->migrate($extension);