mirror of
https://github.com/flarum/framework.git
synced 2024-11-24 21:20:02 +08:00
Drop MigrationServiceProvider
This commit is contained in:
parent
443949f7b9
commit
a5e286e662
|
@ -54,6 +54,10 @@ class DatabaseServiceProvider extends AbstractServiceProvider
|
||||||
|
|
||||||
$this->app->alias(ConnectionInterface::class, 'db.connection');
|
$this->app->alias(ConnectionInterface::class, 'db.connection');
|
||||||
$this->app->alias(ConnectionInterface::class, 'flarum.db');
|
$this->app->alias(ConnectionInterface::class, 'flarum.db');
|
||||||
|
|
||||||
|
$this->app->singleton(MigrationRepositoryInterface::class, function ($app) {
|
||||||
|
return new DatabaseMigrationRepository($app['flarum.db'], 'migrations');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This file is part of Flarum.
|
|
||||||
*
|
|
||||||
* For detailed copyright and license information, please view the
|
|
||||||
* LICENSE file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Flarum\Database;
|
|
||||||
|
|
||||||
use Flarum\Foundation\AbstractServiceProvider;
|
|
||||||
use Flarum\Foundation\Paths;
|
|
||||||
use Illuminate\Filesystem\Filesystem;
|
|
||||||
|
|
||||||
class MigrationServiceProvider extends AbstractServiceProvider
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public function register()
|
|
||||||
{
|
|
||||||
$this->app->singleton(MigrationRepositoryInterface::class, function ($app) {
|
|
||||||
return new DatabaseMigrationRepository($app['flarum.db'], 'migrations');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -14,7 +14,6 @@ use Flarum\Api\ApiServiceProvider;
|
||||||
use Flarum\Bus\BusServiceProvider;
|
use Flarum\Bus\BusServiceProvider;
|
||||||
use Flarum\Console\ConsoleServiceProvider;
|
use Flarum\Console\ConsoleServiceProvider;
|
||||||
use Flarum\Database\DatabaseServiceProvider;
|
use Flarum\Database\DatabaseServiceProvider;
|
||||||
use Flarum\Database\MigrationServiceProvider;
|
|
||||||
use Flarum\Discussion\DiscussionServiceProvider;
|
use Flarum\Discussion\DiscussionServiceProvider;
|
||||||
use Flarum\Extension\ExtensionServiceProvider;
|
use Flarum\Extension\ExtensionServiceProvider;
|
||||||
use Flarum\Formatter\FormatterServiceProvider;
|
use Flarum\Formatter\FormatterServiceProvider;
|
||||||
|
@ -125,7 +124,6 @@ class InstalledSite implements SiteInterface
|
||||||
$laravel->register(HttpServiceProvider::class);
|
$laravel->register(HttpServiceProvider::class);
|
||||||
$laravel->register(LocaleServiceProvider::class);
|
$laravel->register(LocaleServiceProvider::class);
|
||||||
$laravel->register(MailServiceProvider::class);
|
$laravel->register(MailServiceProvider::class);
|
||||||
$laravel->register(MigrationServiceProvider::class);
|
|
||||||
$laravel->register(NotificationServiceProvider::class);
|
$laravel->register(NotificationServiceProvider::class);
|
||||||
$laravel->register(PostServiceProvider::class);
|
$laravel->register(PostServiceProvider::class);
|
||||||
$laravel->register(QueueServiceProvider::class);
|
$laravel->register(QueueServiceProvider::class);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user