Skip to content

Commit

Permalink
ImageManager in constructor (#30)
Browse files Browse the repository at this point in the history
* ImageManager in constructor

* Require Flarum 1.2
  • Loading branch information
imorland committed Jan 24, 2022
1 parent 773382f commit 967da84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"forum": "https://discuss.flarum.org/d/23437"
},
"require": {
"flarum/core": "^1.0.0"
"flarum/core": "^1.2.0"
},
"autoload": {
"psr-4": {
Expand Down
5 changes: 3 additions & 2 deletions src/CoverValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Flarum\User\AvatarValidator;
use Illuminate\Validation\Factory;
use Illuminate\Contracts\Events\Dispatcher;
use Intervention\Image\ImageManager;
use Symfony\Contracts\Translation\TranslatorInterface;

class CoverValidator extends AvatarValidator
Expand All @@ -27,9 +28,9 @@ class CoverValidator extends AvatarValidator
/**
* {@inheritdoc}
*/
public function __construct(Factory $validator, TranslatorInterface $translator, SettingsRepositoryInterface $config)
public function __construct(Factory $validator, TranslatorInterface $translator, ImageManager $imageManager, SettingsRepositoryInterface $config)
{
parent::__construct($validator, $translator);
parent::__construct($validator, $translator, $imageManager);

$this->config = $config;
}
Expand Down

0 comments on commit 967da84

Please sign in to comment.