From b8632d693a11d6f7b7e6d86e01b1b1533ca7d6c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Klabbers?= Date: Tue, 8 May 2018 10:32:28 +0200 Subject: [PATCH] fixes session during installation (#1418) * fixes session during installation * Apply fixes from StyleCI [ci skip] [skip ci] * styling of commented code, removed unnecessary import --- src/Foundation/Application.php | 8 +++----- src/Http/Server.php | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Foundation/Application.php b/src/Foundation/Application.php index 2753291b5..61c8fd798 100644 --- a/src/Foundation/Application.php +++ b/src/Foundation/Application.php @@ -119,22 +119,20 @@ class Application extends Container implements ApplicationContract * * @return bool */ - public function isInstalled() + public function isInstalled(): bool { return $this->bound('flarum.config'); } - public function isUpToDate() + public function isUpToDate(): bool { $settings = $this->make(SettingsRepositoryInterface::class); try { $version = $settings->get('version'); } finally { - $isUpToDate = isset($version) && $version === $this->version(); + return isset($version) && $version === $this->version(); } - - return $isUpToDate; } /** diff --git a/src/Http/Server.php b/src/Http/Server.php index 9c5c1af7c..222d177fe 100644 --- a/src/Http/Server.php +++ b/src/Http/Server.php @@ -118,7 +118,7 @@ class Server // (Right now it tries to resolve a database connection because of the injected settings repo instance) // We could register a different settings repo when Flarum is not installed //$pipe->pipe($this->app->make(HandleErrors::class, ['debug' => true])); - $pipe->pipe($this->app->make(StartSession::class)); + //$pipe->pipe($this->app->make(StartSession::class)); $pipe->pipe($this->app->make(DispatchRoute::class, ['routes' => $this->app->make('flarum.install.routes')])); return $pipe;