From a5e286e6624c477d01e6113f2f06e9a87bbf4280 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Fri, 8 May 2020 12:04:04 +0200 Subject: [PATCH] Drop MigrationServiceProvider --- src/Database/DatabaseServiceProvider.php | 4 ++++ src/Database/MigrationServiceProvider.php | 27 ----------------------- src/Foundation/InstalledSite.php | 2 -- 3 files changed, 4 insertions(+), 29 deletions(-) delete mode 100644 src/Database/MigrationServiceProvider.php diff --git a/src/Database/DatabaseServiceProvider.php b/src/Database/DatabaseServiceProvider.php index 6d32601f9..8b8946baa 100644 --- a/src/Database/DatabaseServiceProvider.php +++ b/src/Database/DatabaseServiceProvider.php @@ -54,6 +54,10 @@ class DatabaseServiceProvider extends AbstractServiceProvider $this->app->alias(ConnectionInterface::class, 'db.connection'); $this->app->alias(ConnectionInterface::class, 'flarum.db'); + + $this->app->singleton(MigrationRepositoryInterface::class, function ($app) { + return new DatabaseMigrationRepository($app['flarum.db'], 'migrations'); + }); } /** diff --git a/src/Database/MigrationServiceProvider.php b/src/Database/MigrationServiceProvider.php deleted file mode 100644 index 135cf0c45..000000000 --- a/src/Database/MigrationServiceProvider.php +++ /dev/null @@ -1,27 +0,0 @@ -app->singleton(MigrationRepositoryInterface::class, function ($app) { - return new DatabaseMigrationRepository($app['flarum.db'], 'migrations'); - }); - } -} diff --git a/src/Foundation/InstalledSite.php b/src/Foundation/InstalledSite.php index fd54a6488..3008def05 100644 --- a/src/Foundation/InstalledSite.php +++ b/src/Foundation/InstalledSite.php @@ -14,7 +14,6 @@ use Flarum\Api\ApiServiceProvider; use Flarum\Bus\BusServiceProvider; use Flarum\Console\ConsoleServiceProvider; use Flarum\Database\DatabaseServiceProvider; -use Flarum\Database\MigrationServiceProvider; use Flarum\Discussion\DiscussionServiceProvider; use Flarum\Extension\ExtensionServiceProvider; use Flarum\Formatter\FormatterServiceProvider; @@ -125,7 +124,6 @@ class InstalledSite implements SiteInterface $laravel->register(HttpServiceProvider::class); $laravel->register(LocaleServiceProvider::class); $laravel->register(MailServiceProvider::class); - $laravel->register(MigrationServiceProvider::class); $laravel->register(NotificationServiceProvider::class); $laravel->register(PostServiceProvider::class); $laravel->register(QueueServiceProvider::class);