diff --git a/framework/core/src/Database/DatabaseServiceProvider.php b/framework/core/src/Database/DatabaseServiceProvider.php index e24499720..743012dd6 100644 --- a/framework/core/src/Database/DatabaseServiceProvider.php +++ b/framework/core/src/Database/DatabaseServiceProvider.php @@ -27,7 +27,7 @@ class DatabaseServiceProvider extends AbstractServiceProvider $this->app->singleton('flarum.db', function () { $factory = new ConnectionFactory($this->app); - $connection = $factory->make($this->app->make('flarum.config')['database']); + $connection = $factory->make($this->app->config('database')); $connection->setEventDispatcher($this->app->make('Illuminate\Contracts\Events\Dispatcher')); $connection->setFetchMode(PDO::FETCH_CLASS); diff --git a/framework/core/src/Install/Console/InstallCommand.php b/framework/core/src/Install/Console/InstallCommand.php index 6b75516a9..1bd219f00 100644 --- a/framework/core/src/Install/Console/InstallCommand.php +++ b/framework/core/src/Install/Console/InstallCommand.php @@ -238,7 +238,7 @@ class InstallCommand extends AbstractCommand protected function writeSettings() { - $settings = $this->application->make('Flarum\Settings\SettingsRepository'); + $settings = $this->application->make('Flarum\Settings\SettingsRepositoryInterface'); $this->info('Writing default settings'); diff --git a/framework/core/src/Locale/LocaleServiceProvider.php b/framework/core/src/Locale/LocaleServiceProvider.php index d1271312b..ed5b30d87 100644 --- a/framework/core/src/Locale/LocaleServiceProvider.php +++ b/framework/core/src/Locale/LocaleServiceProvider.php @@ -37,7 +37,7 @@ class LocaleServiceProvider extends AbstractServiceProvider $this->app->alias('Flarum\Locale\LocaleManager', 'flarum.localeManager'); $this->app->singleton('translator', function () { - $defaultLocale = $this->app->make('flarum.settings')->get('default_locale'); + $defaultLocale = $this->app->isInstalled() ? $this->app->make('flarum.settings')->get('default_locale') : 'en'; $translator = new Translator($defaultLocale, new MessageSelector()); $translator->setFallbackLocales([$defaultLocale]);