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 a67eca0c9e
commit a7ed625d16

View File

@ -10,6 +10,7 @@
namespace Flarum\Formatter;
use Flarum\Foundation\AbstractServiceProvider;
use Illuminate\Cache\Repository;
use Illuminate\Contracts\Container\Container;
class FormatterServiceProvider extends AbstractServiceProvider
@ -21,7 +22,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'
);