1
0
mirror of https://github.com/flarum/core.git synced 2025-08-06 00:17:31 +02:00

Split SessionServiceProvider from UserServiceProvider

This lets us register the former during installation, where the
latter is not yet registered.

That, in turn, means we can finally re-enable the StartSession
middleware in the installer app, which we need to log in the new
admin user when installation is complete.
This commit is contained in:
Franz Liedke
2018-08-14 23:30:49 +02:00
parent 98aaa6a130
commit e65b3ac153
6 changed files with 42 additions and 17 deletions

View File

@@ -14,6 +14,7 @@ namespace Flarum\Tests\Test\Concerns;
use Flarum\Api\ApiServiceProvider;
use Flarum\Api\Client;
use Flarum\User\Guest;
use Flarum\User\SessionServiceProvider;
use Flarum\User\User;
use Flarum\User\UserServiceProvider;
use Psr\Http\Message\ResponseInterface;
@@ -22,6 +23,7 @@ trait MakesApiRequests
{
public function call(string $controller, User $actor = null, array $queryParams = [], array $body = []): ResponseInterface
{
$this->app->register(SessionServiceProvider::class);
$this->app->register(UserServiceProvider::class);
$this->app->register(ApiServiceProvider::class);
$this->app->make('flarum.api.middleware');