Skip to content
Snippets Groups Projects
Commit dd054699 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

Issue #3030485 by catch, R.shaikh, Gábor Hojtsy, alexpott: [Symfony 5] The...

Issue #3030485 by catch, R.shaikh, Gábor Hojtsy, alexpott: [Symfony 5] The "Drupal\Core\Validation\TranslatorInterface" interface extends "Symfony\Component\Translation\TranslatorInterface" that is deprecated since Symfony 4.2, use Symfony\Contracts\Translation\TranslatorInterface instead
parent f5cd28b7
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -2,18 +2,35 @@
namespace Drupal\Core\Validation;
use Symfony\Component\Translation\TranslatorInterface as SymfonyTranslatorInterface;
/**
* Defines an interface used in validation.
*
* This extends the interface used by the Symfony validator in order to indicate
* that the Drupal code is actually independent from the Symfony translation
* component.
* This replaces the interface used by the Symfony validator in order
* to indicate that the Drupal code is actually independent from the
* Symfony translation component.
*
* @see https://github.com/symfony/symfony/pull/6189
* @see https://github.com/symfony/symfony/issues/15714
*/
interface TranslatorInterface extends SymfonyTranslatorInterface {
interface TranslatorInterface {
/**
* Translates the given message.
*
* @param string $id
* The message id (may also be an object that can be cast to string).
* @param array $parameters
* An array of parameters for the message.
* @param string|null $domain
* The domain for the message or null to use the default.
* @param string|null $locale
* The locale or null to use the default.
* @return string
* The translated string.
*
* @throws InvalidArgumentException
* If the locale contains invalid characters.
*/
public function trans($id, array $parameters = [], $domain = NULL, $locale = NULL);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment