diff --git a/src/Forum/Content/Index.php b/src/Forum/Content/Index.php index 1593ac147..2f0d506e0 100644 --- a/src/Forum/Content/Index.php +++ b/src/Forum/Content/Index.php @@ -15,10 +15,10 @@ use Flarum\Frontend\Document; use Flarum\Http\UrlGenerator; use Flarum\Settings\SettingsRepositoryInterface; use Flarum\User\User; -use Illuminate\Contracts\Translation\Translator; use Illuminate\Contracts\View\Factory; use Illuminate\Support\Arr; use Psr\Http\Message\ServerRequestInterface as Request; +use Symfony\Component\Translation\TranslatorInterface; class Index { @@ -42,14 +42,19 @@ class Index */ protected $url; + /** + * @var TranslatorInterface + */ + protected $translator; + /** * @param Client $api * @param Factory $view * @param SettingsRepositoryInterface $settings * @param UrlGenerator $url - * @param Translator $translator + * @param TranslatorInterface $translator */ - public function __construct(Client $api, Factory $view, SettingsRepositoryInterface $settings, UrlGenerator $url, Translator $translator) + public function __construct(Client $api, Factory $view, SettingsRepositoryInterface $settings, UrlGenerator $url, TranslatorInterface $translator) { $this->api = $api; $this->view = $view; diff --git a/src/User/AccountActivationMailer.php b/src/User/AccountActivationMailer.php index a07f3e6de..883b170d6 100644 --- a/src/User/AccountActivationMailer.php +++ b/src/User/AccountActivationMailer.php @@ -14,7 +14,7 @@ use Flarum\Mail\Job\SendRawEmailJob; use Flarum\Settings\SettingsRepositoryInterface; use Flarum\User\Event\Registered; use Illuminate\Contracts\Queue\Queue; -use Illuminate\Contracts\Translation\Translator; +use Symfony\Component\Translation\TranslatorInterface; class AccountActivationMailer { @@ -34,7 +34,7 @@ class AccountActivationMailer protected $url; /** - * @var Translator + * @var TranslatorInterface */ protected $translator; @@ -42,9 +42,9 @@ class AccountActivationMailer * @param \Flarum\Settings\SettingsRepositoryInterface $settings * @param Queue $queue * @param UrlGenerator $url - * @param Translator $translator + * @param TranslatorInterface $translator */ - public function __construct(SettingsRepositoryInterface $settings, Queue $queue, UrlGenerator $url, Translator $translator) + public function __construct(SettingsRepositoryInterface $settings, Queue $queue, UrlGenerator $url, TranslatorInterface $translator) { $this->settings = $settings; $this->queue = $queue; diff --git a/src/User/Command/RequestPasswordResetHandler.php b/src/User/Command/RequestPasswordResetHandler.php index b18e927cc..9dc7d726a 100644 --- a/src/User/Command/RequestPasswordResetHandler.php +++ b/src/User/Command/RequestPasswordResetHandler.php @@ -15,10 +15,10 @@ use Flarum\Settings\SettingsRepositoryInterface; use Flarum\User\PasswordToken; use Flarum\User\UserRepository; use Illuminate\Contracts\Queue\Queue; -use Illuminate\Contracts\Translation\Translator; use Illuminate\Contracts\Validation\Factory; use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Validation\ValidationException; +use Symfony\Component\Translation\TranslatorInterface; class RequestPasswordResetHandler { @@ -43,7 +43,7 @@ class RequestPasswordResetHandler protected $url; /** - * @var Translator + * @var TranslatorInterface */ protected $translator; @@ -57,7 +57,7 @@ class RequestPasswordResetHandler * @param SettingsRepositoryInterface $settings * @param Queue $queue * @param UrlGenerator $url - * @param Translator $translator + * @param TranslatorInterface $translator * @param Factory $validatorFactory */ public function __construct( @@ -65,7 +65,7 @@ class RequestPasswordResetHandler SettingsRepositoryInterface $settings, Queue $queue, UrlGenerator $url, - Translator $translator, + TranslatorInterface $translator, Factory $validatorFactory ) { $this->users = $users; diff --git a/src/User/EmailConfirmationMailer.php b/src/User/EmailConfirmationMailer.php index 5d35b95ed..1a052f974 100644 --- a/src/User/EmailConfirmationMailer.php +++ b/src/User/EmailConfirmationMailer.php @@ -14,7 +14,7 @@ use Flarum\Mail\Job\SendRawEmailJob; use Flarum\Settings\SettingsRepositoryInterface; use Flarum\User\Event\EmailChangeRequested; use Illuminate\Contracts\Queue\Queue; -use Illuminate\Contracts\Translation\Translator; +use Symfony\Component\Translation\TranslatorInterface; class EmailConfirmationMailer { @@ -34,11 +34,11 @@ class EmailConfirmationMailer protected $url; /** - * @var Translator + * @var TranslatorInterface */ protected $translator; - public function __construct(SettingsRepositoryInterface $settings, Queue $queue, UrlGenerator $url, Translator $translator) + public function __construct(SettingsRepositoryInterface $settings, Queue $queue, UrlGenerator $url, TranslatorInterface $translator) { $this->settings = $settings; $this->queue = $queue;