1
0
mirror of https://github.com/flarum/core.git synced 2025-10-14 16:34:26 +02:00

Simplify interface of migration-related classes

Mostly, we only need a database connection, instead of one of
Laravel's "connection resolvers".

Again, this makes our life easier during installation, where
we already instantiate a database connection. We can now use
that to instantiate our own Migrator class, instead of using
the IoC container to build one.
This commit is contained in:
Franz Liedke
2018-04-24 23:50:36 +02:00
parent a1c3da9f8f
commit d301d260c1
4 changed files with 22 additions and 101 deletions

View File

@@ -22,7 +22,7 @@ class MigrationServiceProvider extends AbstractServiceProvider
public function register()
{
$this->app->singleton('Flarum\Database\MigrationRepositoryInterface', function ($app) {
return new DatabaseMigrationRepository($app['db'], 'migrations');
return new DatabaseMigrationRepository($app['flarum.db'], 'migrations');
});
$this->app->bind(MigrationCreator::class, function (Application $app) {