Problem/Motivation
Method "Symfony\Contracts\Translation\TranslatorInterface::trans()" might add "string" as a native return type declaration in the future. Do the same in implementation "Drupal\Core\Validation\DrupalTranslator" now to avoid errors or add an explicit @return annotation to suppress this message.
Method "Symfony\Contracts\Translation\TranslatorInterface::getLocale()" might add "string" as a native return type declaration in the future. Do the same in implementation "Drupal\Core\Validation\DrupalTranslator" now to avoid errors or add an explicit @return annotation to suppress this message.
Steps to reproduce
Proposed resolution
- Fix upstream to allow our return values - https://github.com/symfony/symfony/pull/44911
- Implement the typehints.