mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 14:16:39 +08:00
reverting translator contract
This commit is contained in:
parent
c01268d9ae
commit
6280fb2498
@ -18,9 +18,9 @@ use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\EmailToken;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Illuminate\Contracts\Mail\Mailer;
|
||||
use Illuminate\Contracts\Translation\Translator;
|
||||
use Illuminate\Mail\Message;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Zend\Diactoros\Response\EmptyResponse;
|
||||
|
||||
class SendConfirmationEmailController implements ControllerInterface
|
||||
@ -43,7 +43,7 @@ class SendConfirmationEmailController implements ControllerInterface
|
||||
protected $url;
|
||||
|
||||
/**
|
||||
* @var Translator
|
||||
* @var TranslatorInterface
|
||||
*/
|
||||
protected $translator;
|
||||
|
||||
@ -51,9 +51,9 @@ class SendConfirmationEmailController implements ControllerInterface
|
||||
* @param \Flarum\Settings\SettingsRepositoryInterface $settings
|
||||
* @param Mailer $mailer
|
||||
* @param UrlGenerator $url
|
||||
* @param Translator $translator
|
||||
* @param TranslatorInterface $translator
|
||||
*/
|
||||
public function __construct(SettingsRepositoryInterface $settings, Mailer $mailer, UrlGenerator $url, Translator $translator)
|
||||
public function __construct(SettingsRepositoryInterface $settings, Mailer $mailer, UrlGenerator $url, TranslatorInterface $translator)
|
||||
{
|
||||
$this->settings = $settings;
|
||||
$this->mailer = $mailer;
|
||||
|
@ -12,8 +12,8 @@
|
||||
namespace Flarum\Api\Serializer;
|
||||
|
||||
use Flarum\Group\Group;
|
||||
use Illuminate\Contracts\Translation\Translator;
|
||||
use InvalidArgumentException;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
|
||||
class GroupSerializer extends AbstractSerializer
|
||||
{
|
||||
@ -23,14 +23,14 @@ class GroupSerializer extends AbstractSerializer
|
||||
protected $type = 'groups';
|
||||
|
||||
/**
|
||||
* @var Translator
|
||||
* @var TranslatorInterface
|
||||
*/
|
||||
private $translator;
|
||||
|
||||
/**
|
||||
* @param Translator $translator
|
||||
* @param TranslatorInterface $translator
|
||||
*/
|
||||
public function __construct(Translator $translator)
|
||||
public function __construct(TranslatorInterface $translator)
|
||||
{
|
||||
$this->translator = $translator;
|
||||
}
|
||||
|
@ -15,9 +15,9 @@ use DateTime;
|
||||
use Flarum\Http\Controller\AbstractHtmlController;
|
||||
use Flarum\User\Exception\InvalidConfirmationTokenException;
|
||||
use Flarum\User\PasswordToken;
|
||||
use Illuminate\Contracts\Translation\Translator;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
|
||||
class ResetPasswordController extends AbstractHtmlController
|
||||
{
|
||||
@ -27,14 +27,15 @@ class ResetPasswordController extends AbstractHtmlController
|
||||
protected $view;
|
||||
|
||||
/**
|
||||
* @var Translator
|
||||
* @var TranslatorInterface
|
||||
*/
|
||||
protected $translator;
|
||||
|
||||
/**
|
||||
* @param Factory $view
|
||||
* @param TranslatorInterface $translator
|
||||
*/
|
||||
public function __construct(Factory $view, Translator $translator)
|
||||
public function __construct(Factory $view, TranslatorInterface $translator)
|
||||
{
|
||||
$this->view = $view;
|
||||
$this->translator = $translator;
|
||||
|
@ -13,9 +13,9 @@ namespace Flarum\Foundation;
|
||||
|
||||
use Flarum\Foundation\Event\Validating;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
use Illuminate\Contracts\Translation\Translator;
|
||||
use Illuminate\Contracts\Validation\ValidationException;
|
||||
use Illuminate\Validation\Factory;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
|
||||
abstract class AbstractValidator
|
||||
{
|
||||
@ -35,16 +35,16 @@ abstract class AbstractValidator
|
||||
protected $events;
|
||||
|
||||
/**
|
||||
* @var Translator
|
||||
* @var TranslatorInterface
|
||||
*/
|
||||
protected $translator;
|
||||
|
||||
/**
|
||||
* @param Factory $validator
|
||||
* @param Dispatcher $events
|
||||
* @param Translator $translator
|
||||
* @param TranslatorInterface $translator
|
||||
*/
|
||||
public function __construct(Factory $validator, Dispatcher $events, Translator $translator)
|
||||
public function __construct(Factory $validator, Dispatcher $events, TranslatorInterface $translator)
|
||||
{
|
||||
$this->validator = $validator;
|
||||
$this->events = $events;
|
||||
|
Loading…
x
Reference in New Issue
Block a user