Support Drupal 9

Created on 6 February 2021, almost 4 years ago
Updated 3 January 2024, about 1 year ago

Remove deprecated service and add support for 9

📌 Task
Status

Fixed

Component

Code

Created by

🇧🇪Belgium StryKaizer Belgium

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇪Germany gngn

    With #2 we are using $this->t() and $this->messenger in a static function, i.e. we are not in object context.

    I also think we do not need the newly introduced dependency injections at all:

    • MessengerInterface $messenger is only used in public static function changeAuthorActionFinishedCallback(), so not in object context.
    • TranslationInterface $stringTranslation is not used at all (because #2 also has "use StringTranslationTrait" which would be enough for the call to $this->t() in the same function ...
    • ... but this also happens in the static function, so we cannot reference $this at all

    There is still one untranslated string 'Changing author...' in public static function updateFields().

    This considered I think we should revert this commit (and $message = 'Changing author...'; to $message = t('Changing author...');.

    Or did I get something wrong?

    Patch coming.

Production build 0.71.5 2024