diff --git a/framework/core/src/Foundation/AbstractValidator.php b/framework/core/src/Foundation/AbstractValidator.php index 980558337..c5b6819f7 100644 --- a/framework/core/src/Foundation/AbstractValidator.php +++ b/framework/core/src/Foundation/AbstractValidator.php @@ -9,8 +9,6 @@ namespace Flarum\Foundation; -use Flarum\Foundation\Event\Validating; -use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Support\Arr; use Illuminate\Validation\Factory; use Illuminate\Validation\ValidationException; @@ -38,11 +36,6 @@ abstract class AbstractValidator */ protected $validator; - /** - * @var Dispatcher - */ - protected $events; - /** * @var TranslatorInterface */ @@ -50,13 +43,11 @@ abstract class AbstractValidator /** * @param Factory $validator - * @param Dispatcher $events * @param TranslatorInterface $translator */ - public function __construct(Factory $validator, Dispatcher $events, TranslatorInterface $translator) + public function __construct(Factory $validator, TranslatorInterface $translator) { $this->validator = $validator; - $this->events = $events; $this->translator = $translator; } @@ -102,13 +93,6 @@ abstract class AbstractValidator $validator = $this->validator->make($attributes, $rules, $this->getMessages()); - /** - * @deprecated in beta 15, removed in beta 16. - */ - $this->events->dispatch( - new Validating($this, $validator) - ); - foreach ($this->configuration as $callable) { $callable($this, $validator); } diff --git a/framework/core/src/Foundation/Event/Validating.php b/framework/core/src/Foundation/Event/Validating.php deleted file mode 100644 index 86c6d4cd3..000000000 --- a/framework/core/src/Foundation/Event/Validating.php +++ /dev/null @@ -1,42 +0,0 @@ -type = $type; - $this->validator = $validator; - } -}