Skip to content

Commit

Permalink
Ensure cache factory is passed to the StartSession middleware.
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean committed Nov 28, 2024
1 parent 2cb135c commit d803f3e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Providers/CpServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Statamic\Extensions\Translation\Translator;
use Statamic\Facades\User;
use Statamic\Fieldtypes\Sets;
use Statamic\Http\Middleware\CP\StartSession;
use Statamic\Http\View\Composers\CustomLogoComposer;
use Statamic\Http\View\Composers\FieldComposer;
use Statamic\Http\View\Composers\JavascriptComposer;
Expand Down Expand Up @@ -66,6 +67,12 @@ public function register()
$this->app->singleton(LicenseManager::class, function ($app) {
return new LicenseManager($app[Outpost::class]);
});

$this->app->singleton(StartSession::class, function ($app) {
return new StartSession($app->make('session'), function () use ($app) {
return $app->make('cache');
});
});
}

protected function registerMiddlewareGroups()
Expand Down

0 comments on commit d803f3e

Please sign in to comment.