diff --git a/framework/core/src/Api/Controller/SendConfirmationEmailController.php b/framework/core/src/Api/Controller/SendConfirmationEmailController.php index 2935f0067..8140fa997 100644 --- a/framework/core/src/Api/Controller/SendConfirmationEmailController.php +++ b/framework/core/src/Api/Controller/SendConfirmationEmailController.php @@ -20,7 +20,7 @@ use Flarum\User\Exception\PermissionDeniedException; use Illuminate\Contracts\Mail\Mailer; use Illuminate\Mail\Message; use Psr\Http\Message\ServerRequestInterface; -use Symfony\Component\Translation\TranslatorInterface; +use Illuminate\Contracts\Translation\Translator; use Zend\Diactoros\Response\EmptyResponse; class SendConfirmationEmailController implements ControllerInterface @@ -43,7 +43,7 @@ class SendConfirmationEmailController implements ControllerInterface protected $url; /** - * @var TranslatorInterface + * @var Translator */ protected $translator; @@ -51,9 +51,9 @@ class SendConfirmationEmailController implements ControllerInterface * @param \Flarum\Settings\SettingsRepositoryInterface $settings * @param Mailer $mailer * @param UrlGenerator $url - * @param TranslatorInterface $translator + * @param Translator $translator */ - public function __construct(SettingsRepositoryInterface $settings, Mailer $mailer, UrlGenerator $url, TranslatorInterface $translator) + public function __construct(SettingsRepositoryInterface $settings, Mailer $mailer, UrlGenerator $url, Translator $translator) { $this->settings = $settings; $this->mailer = $mailer; diff --git a/framework/core/src/Api/Serializer/GroupSerializer.php b/framework/core/src/Api/Serializer/GroupSerializer.php index 7cd1eb989..820803223 100644 --- a/framework/core/src/Api/Serializer/GroupSerializer.php +++ b/framework/core/src/Api/Serializer/GroupSerializer.php @@ -13,7 +13,7 @@ namespace Flarum\Api\Serializer; use Flarum\Group\Group; use InvalidArgumentException; -use Symfony\Component\Translation\TranslatorInterface; +use Illuminate\Contracts\Translation\Translator; class GroupSerializer extends AbstractSerializer { @@ -23,14 +23,14 @@ class GroupSerializer extends AbstractSerializer protected $type = 'groups'; /** - * @var TranslatorInterface + * @var Translator */ private $translator; /** - * @param TranslatorInterface $translator + * @param Translator $translator */ - public function __construct(TranslatorInterface $translator) + public function __construct(Translator $translator) { $this->translator = $translator; } diff --git a/framework/core/src/Forum/Controller/ResetPasswordController.php b/framework/core/src/Forum/Controller/ResetPasswordController.php index 641da9b42..4a737b497 100644 --- a/framework/core/src/Forum/Controller/ResetPasswordController.php +++ b/framework/core/src/Forum/Controller/ResetPasswordController.php @@ -17,7 +17,7 @@ use Flarum\User\Exception\InvalidConfirmationTokenException; use Flarum\User\PasswordToken; use Illuminate\Contracts\View\Factory; use Psr\Http\Message\ServerRequestInterface as Request; -use Symfony\Component\Translation\TranslatorInterface; +use Illuminate\Contracts\Translation\Translator; class ResetPasswordController extends AbstractHtmlController { @@ -27,14 +27,14 @@ class ResetPasswordController extends AbstractHtmlController protected $view; /** - * @var TranslatorInterface + * @var Translator */ protected $translator; /** * @param Factory $view */ - public function __construct(Factory $view, TranslatorInterface $translator) + public function __construct(Factory $view, Translator $translator) { $this->view = $view; $this->translator = $translator; diff --git a/framework/core/src/Foundation/AbstractValidator.php b/framework/core/src/Foundation/AbstractValidator.php index ee1062af5..4d1a1fd4e 100644 --- a/framework/core/src/Foundation/AbstractValidator.php +++ b/framework/core/src/Foundation/AbstractValidator.php @@ -15,7 +15,7 @@ use Flarum\Foundation\Event\Validating; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Contracts\Validation\ValidationException; use Illuminate\Validation\Factory; -use Symfony\Component\Translation\TranslatorInterface; +use Illuminate\Contracts\Translation\Translator; abstract class AbstractValidator { @@ -35,16 +35,16 @@ abstract class AbstractValidator protected $events; /** - * @var TranslatorInterface + * @var Translator */ protected $translator; /** * @param Factory $validator * @param Dispatcher $events - * @param TranslatorInterface $translator + * @param Translator $translator */ - public function __construct(Factory $validator, Dispatcher $events, TranslatorInterface $translator) + public function __construct(Factory $validator, Dispatcher $events, Translator $translator) { $this->validator = $validator; $this->events = $events; diff --git a/framework/core/src/Install/Console/InstallCommand.php b/framework/core/src/Install/Console/InstallCommand.php index 6c628fcbd..de49c11f6 100644 --- a/framework/core/src/Install/Console/InstallCommand.php +++ b/framework/core/src/Install/Console/InstallCommand.php @@ -36,7 +36,7 @@ use Illuminate\Filesystem\Filesystem; use Illuminate\Validation\Factory; use PDO; use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Translation\TranslatorInterface; +use Illuminate\Contracts\Translation\Translator; class InstallCommand extends AbstractCommand { @@ -409,7 +409,7 @@ class InstallCommand extends AbstractCommand */ protected function getValidator() { - return new Factory($this->application->make(TranslatorInterface::class)); + return new Factory($this->application->make(Translator::class)); } protected function showErrors($errors) diff --git a/framework/core/src/Locale/LocaleServiceProvider.php b/framework/core/src/Locale/LocaleServiceProvider.php index ac179c52a..35b52eef7 100644 --- a/framework/core/src/Locale/LocaleServiceProvider.php +++ b/framework/core/src/Locale/LocaleServiceProvider.php @@ -16,7 +16,6 @@ use Flarum\Foundation\AbstractServiceProvider; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Contracts\Translation\Translator as TranslatorContract; use Symfony\Component\Translation\MessageSelector; -use Symfony\Component\Translation\TranslatorInterface; class LocaleServiceProvider extends AbstractServiceProvider { @@ -48,7 +47,6 @@ class LocaleServiceProvider extends AbstractServiceProvider return $translator; }); $this->app->alias('translator', Translator::class); - $this->app->alias('translator', TranslatorInterface::class); $this->app->alias('translator', TranslatorContract::class); } diff --git a/framework/core/src/User/Command/RequestPasswordResetHandler.php b/framework/core/src/User/Command/RequestPasswordResetHandler.php index c0ac0c7fd..fc03314d4 100644 --- a/framework/core/src/User/Command/RequestPasswordResetHandler.php +++ b/framework/core/src/User/Command/RequestPasswordResetHandler.php @@ -20,7 +20,7 @@ use Illuminate\Contracts\Validation\Factory; use Illuminate\Contracts\Validation\ValidationException; use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Mail\Message; -use Symfony\Component\Translation\TranslatorInterface; +use Illuminate\Contracts\Translation\Translator; class RequestPasswordResetHandler { @@ -45,7 +45,7 @@ class RequestPasswordResetHandler protected $url; /** - * @var TranslatorInterface + * @var Translator */ protected $translator; @@ -59,7 +59,7 @@ class RequestPasswordResetHandler * @param SettingsRepositoryInterface $settings * @param Mailer $mailer * @param UrlGenerator $url - * @param TranslatorInterface $translator + * @param Translator $translator * @param Factory $validatorFactory */ public function __construct( @@ -67,7 +67,7 @@ class RequestPasswordResetHandler SettingsRepositoryInterface $settings, Mailer $mailer, UrlGenerator $url, - TranslatorInterface $translator, + Translator $translator, Factory $validatorFactory ) { $this->users = $users; diff --git a/framework/core/src/User/EmailConfirmationMailer.php b/framework/core/src/User/EmailConfirmationMailer.php index 3273690b1..59b892ad3 100755 --- a/framework/core/src/User/EmailConfirmationMailer.php +++ b/framework/core/src/User/EmailConfirmationMailer.php @@ -18,7 +18,7 @@ use Flarum\User\Event\Registered; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Contracts\Mail\Mailer; use Illuminate\Mail\Message; -use Symfony\Component\Translation\TranslatorInterface; +use Illuminate\Contracts\Translation\Translator; class EmailConfirmationMailer { @@ -38,7 +38,7 @@ class EmailConfirmationMailer protected $url; /** - * @var TranslatorInterface + * @var Translator */ protected $translator; @@ -46,9 +46,9 @@ class EmailConfirmationMailer * @param \Flarum\Settings\SettingsRepositoryInterface $settings * @param Mailer $mailer * @param UrlGenerator $url - * @param TranslatorInterface $translator + * @param Translator $translator */ - public function __construct(SettingsRepositoryInterface $settings, Mailer $mailer, UrlGenerator $url, TranslatorInterface $translator) + public function __construct(SettingsRepositoryInterface $settings, Mailer $mailer, UrlGenerator $url, Translator $translator) { $this->settings = $settings; $this->mailer = $mailer;