diff --git a/src/Formatter/Event/Configuring.php b/src/Formatter/Event/Configuring.php deleted file mode 100644 index 9f5993ce4..000000000 --- a/src/Formatter/Event/Configuring.php +++ /dev/null @@ -1,31 +0,0 @@ -configurator = $configurator; - } -} diff --git a/src/Formatter/Event/Parsing.php b/src/Formatter/Event/Parsing.php deleted file mode 100644 index b0fcb3fd1..000000000 --- a/src/Formatter/Event/Parsing.php +++ /dev/null @@ -1,45 +0,0 @@ -parser = $parser; - $this->context = $context; - $this->text = &$text; - } -} diff --git a/src/Formatter/Event/Rendering.php b/src/Formatter/Event/Rendering.php deleted file mode 100644 index 16c17d80c..000000000 --- a/src/Formatter/Event/Rendering.php +++ /dev/null @@ -1,53 +0,0 @@ -renderer = $renderer; - $this->context = $context; - $this->xml = &$xml; - $this->request = $request; - } -} diff --git a/src/Formatter/Formatter.php b/src/Formatter/Formatter.php index f2d6b7c5b..80683ff2d 100644 --- a/src/Formatter/Formatter.php +++ b/src/Formatter/Formatter.php @@ -9,11 +9,7 @@ namespace Flarum\Formatter; -use Flarum\Formatter\Event\Configuring; -use Flarum\Formatter\Event\Parsing; -use Flarum\Formatter\Event\Rendering; use Illuminate\Contracts\Cache\Repository; -use Illuminate\Contracts\Events\Dispatcher; use Psr\Http\Message\ServerRequestInterface; use s9e\TextFormatter\Configurator; use s9e\TextFormatter\Unparser; @@ -31,11 +27,6 @@ class Formatter */ protected $cache; - /** - * @var Dispatcher - */ - protected $events; - /** * @var string */ @@ -43,13 +34,11 @@ class Formatter /** * @param Repository $cache - * @param Dispatcher $events * @param string $cacheDir */ - public function __construct(Repository $cache, Dispatcher $events, $cacheDir) + public function __construct(Repository $cache, $cacheDir) { $this->cache = $cache; - $this->events = $events; $this->cacheDir = $cacheDir; } @@ -79,9 +68,6 @@ class Formatter { $parser = $this->getParser($context); - // Deprecated in beta 15, remove in beta 16 - $this->events->dispatch(new Parsing($parser, $context, $text)); - foreach ($this->parsingCallbacks as $callback) { $text = $callback($parser, $context, $text); } @@ -101,9 +87,6 @@ class Formatter { $renderer = $this->getRenderer(); - // Deprecated in beta 15, remove in beta 16 - $this->events->dispatch(new Rendering($renderer, $context, $xml, $request)); - foreach ($this->renderingCallbacks as $callback) { $xml = $callback($renderer, $context, $xml, $request); } @@ -153,9 +136,6 @@ class Formatter $configurator->Autolink; $configurator->tags->onDuplicate('replace'); - // Deprecated in beta 15, remove in beta 16 - $this->events->dispatch(new Configuring($configurator)); - foreach ($this->configurationCallbacks as $callback) { $callback($configurator); } diff --git a/src/Formatter/FormatterServiceProvider.php b/src/Formatter/FormatterServiceProvider.php index 31aef917a..eb750c877 100644 --- a/src/Formatter/FormatterServiceProvider.php +++ b/src/Formatter/FormatterServiceProvider.php @@ -24,7 +24,6 @@ class FormatterServiceProvider extends AbstractServiceProvider $this->app->singleton('flarum.formatter', function (Container $container) { return new Formatter( new Repository($container->make('cache.filestore')), - $container->make('events'), $this->app[Paths::class]->storage.'/formatter' ); });