From 3f005f67bf7c2c26f25d6493ecbaccecb65feff9 Mon Sep 17 00:00:00 2001 From: Yoan Blanc Date: Fri, 1 Mar 2019 10:29:29 +0100 Subject: [PATCH 1/2] Dispatcher::fire is effectively removed as of 5.8 Signed-off-by: Yoan Blanc --- composer.json | 10 +++++----- src/Laradown.php | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 505bc2c..e2c20e9 100644 --- a/composer.json +++ b/composer.json @@ -8,11 +8,11 @@ "editor" ], "require": { - "illuminate/support": "^5.1", - "illuminate/filesystem": "^5.1", - "illuminate/events": "^5.1", - "illuminate/container": "^5.1", - "illuminate/contracts": "^5.1", + "illuminate/support": "^5.4", + "illuminate/filesystem": "^5.4", + "illuminate/events": "^5.4", + "illuminate/container": "^5.4", + "illuminate/contracts": "^5.4", "erusev/parsedown": "^1.6", "erusev/parsedown-extra": "0.7.*" }, diff --git a/src/Laradown.php b/src/Laradown.php index 24a8f1f..8c0aa25 100644 --- a/src/Laradown.php +++ b/src/Laradown.php @@ -96,12 +96,12 @@ protected function element(array $Element) public function convert($markdown) { // Fire converting event - $this->getContainer('events')->fire('laradown.entity.converting'); + $this->getContainer('events')->dispatch('laradown.entity.converting'); $text = $this->text($markdown); // Fire converted event - $this->getContainer('events')->fire('laradown.entity.converted'); + $this->getContainer('events')->dispatch('laradown.entity.converted'); return $text; } @@ -124,7 +124,7 @@ public function render($markdown) public function collect() { // Fire collecting event - $this->getContainer('events')->fire('laradown.entity.collecting'); + $this->getContainer('events')->dispatch('laradown.entity.collecting'); // Make indicator true $this->collect_indicator = true; @@ -145,7 +145,7 @@ public function endCollect() $markdown = ob_get_clean(); // Fire collected event - $this->getContainer('events')->fire('laradown.entity.collected'); + $this->getContainer('events')->dispatch('laradown.entity.collected'); // Convert the markdown content to html return $this->convert($markdown); From c2f2137f67ed23ac29159db4ba79246bfa9dec35 Mon Sep 17 00:00:00 2001 From: Yoan Blanc Date: Fri, 1 Mar 2019 10:33:48 +0100 Subject: [PATCH 2/2] readme: update to 5.8 Signed-off-by: Yoan Blanc --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 65c9f9a..329d07c 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ The best and easiest way to install this package is through [Composer](https://g ### Compatibility -This package fully compatible with **[Laravel](https://laravel.com)** `5.1.*|5.2.*|5.3.*|5.4.*|5.5.x`. +This package fully compatible with **[Laravel](https://laravel.com)** `^5.4`. ### Require Package @@ -33,7 +33,7 @@ After installing the package, open your Laravel config file located at `config/a Buzzylab\Laradown\MarkdownServiceProvider::class, ``` -> **Note:** Checkout Laravel's [Service Providers](https://laravel.com/docs/5.5/providers) and [Service Container](https://laravel.com/docs/5.5/container) documentation for further details. +> **Note:** Checkout Laravel's [Service Providers](https://laravel.com/docs/5.8/providers) and [Service Container](https://laravel.com/docs/5.8/container) documentation for further details. And add the following to `$aliases`