From d07182622e3ccdb135528dc36b5daeafc7401605 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Wed, 26 Aug 2015 09:46:20 +0930 Subject: [PATCH] Autoload the cached PHP renderer --- framework/core/src/Core/Formatter/Formatter.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/framework/core/src/Core/Formatter/Formatter.php b/framework/core/src/Core/Formatter/Formatter.php index 77c5cf19e..0de2ff5aa 100644 --- a/framework/core/src/Core/Formatter/Formatter.php +++ b/framework/core/src/Core/Formatter/Formatter.php @@ -32,7 +32,6 @@ class Formatter event(new FormatterConfigurator($configurator)); - return $configurator; } @@ -63,6 +62,12 @@ class Formatter protected function getRenderer(CommentPost $post) { + spl_autoload_register(function ($class) { + if (file_exists($file = storage_path() . '/app/' . $class . '.php')) { + include $file; + } + }); + $renderer = $this->getComponent('renderer'); event(new FormatterRenderer($renderer, $post));