MigrateExecutable and MigrateBatchExecutable should use TranslationInterface

Created on 9 July 2025, 25 days ago

Problem/Motivation

I have a form that instantiates a MigrateBatchExecutable. The $translation param expects the TranslationManager concrete class, but my form class is autowiring the TranslationInterface service. This makes phpstan unhappy, unless I assert that we have the concrete class.

Steps to reproduce

Proposed resolution

Replace \Drupal\Core\StringTranslation\TranslationManager with \Drupal\Core\StringTranslation\TranslationInterface

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

6.0

Component

Code

Created by

🇦🇺Australia mstrelan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024