Fixes an issue where a different cache driver is used and Formatter

attempts to load the s9e Renderer from the wrong cache. It has
to be saved locally so that it can be properly loaded using
the spl auto register functionality.
This commit is contained in:
Daniël Klabbers 2019-09-10 12:33:25 +02:00
parent 6d8e6583c8
commit 6196081bdf

View File

@ -12,6 +12,7 @@
namespace Flarum\Formatter;
use Flarum\Foundation\AbstractServiceProvider;
use Illuminate\Cache\Repository;
use Illuminate\Contracts\Container\Container;
class FormatterServiceProvider extends AbstractServiceProvider
@ -23,7 +24,7 @@ class FormatterServiceProvider extends AbstractServiceProvider
{
$this->app->singleton('flarum.formatter', function (Container $container) {
return new Formatter(
$container->make('cache.store'),
new Repository($container->make('cache.filestore')),
$container->make('events'),
$this->app->storagePath().'/formatter'
);