Problem/Motivation
As found in #2976394: Investigate problems with Symfony 4 now , The "Drupal\Core\Validation\TranslatorInterface" interface extends "Symfony\Component\Translation\TranslatorInterface" that is deprecated since Symfony 4.2. With Symfony 5, we should use Symfony\Contracts\Translation\TranslatorInterface instead.
Similar to #3029197: [symfony 5] Class implements "Symfony\Component\DependencyInjection\ResettableContainerInterface" that is deprecated since Symfony 4.2, use "Symfony\Contracts\Service\ResetInterface" instead. Contracts are in Symfony 4 but not in Symfony 3.4.
Proposed resolution
Some options explored in #3029197: [symfony 5] Class implements "Symfony\Component\DependencyInjection\ResettableContainerInterface" that is deprecated since Symfony 4.2, use "Symfony\Contracts\Service\ResetInterface" instead were:
- Avoid using the interface altogether
- Depend on the contracts (they have higher PHP requirements though so not yet possible)
- Introduce an intermediary interface for us for now that contrib can also use
Remaining tasks
Discuss.
User interface changes
N/A.
API changes
Likely none. Maybe API additions.
Data model changes
None.
Release notes snippet
N/A.