diff --git a/src/Database/MigrationSourceRepository.php b/src/Database/MigrationSourceRepository.php index 02a322661..bda9548b0 100644 --- a/src/Database/MigrationSourceRepository.php +++ b/src/Database/MigrationSourceRepository.php @@ -77,7 +77,7 @@ class MigrationSourceRepository if ($add) { // Selectively add files, but only include those matching the format YYYY_MM_DD_HHIISS_.php // This excludes the create__table. - $files = array_merge($files, glob(realpath($directory) . "/[0-9_]**.php")); + $files = array_merge($files, glob(realpath($directory).'/[0-9_]**.php')); } // Once we found the version that is installed, we can quit. @@ -133,6 +133,7 @@ class MigrationSourceRepository $path = realpath($path); $path = Str::after($path, 'migrations/'); $basename = Str::before($path, '.php'); + return [$path => $basename]; }) ->toArray(); diff --git a/src/Extension/Extension.php b/src/Extension/Extension.php index 7bfe9f405..9e2e898b7 100644 --- a/src/Extension/Extension.php +++ b/src/Extension/Extension.php @@ -9,7 +9,6 @@ namespace Flarum\Extension; -use Flarum\Database\MigrationSourceRepository; use Flarum\Database\Migrator; use Flarum\Extend\LifecycleInterface; use Flarum\Extension\Exception\ExtensionBootError;