Problem/Motivation

Discovered at #2459671: [PP-1] Add detail to AlreadyInstalledException -- that issue is trying to extend the installer's AlreadyInstalledException to provide more context for specific scenarios.

However, the current patch has some crufty doo doo trying to deal with the string_translation service.

Yet due to #2055851: Remove translation of exception messages we never want to translate anything in exception messages, anyway. Why jump through hoops for dead code?

Proposed resolution

  • Remove the StringTranslationTrait from InstallerException
  • Deprecate the constructor args (in a BC way) and trigger an error if that service is passed to the base class or any children exceptions.

Remaining tasks

  1. Implement proposed resolution.
  2. Reviews / refinements.
  3. RTBC.
  4. Commit.
  5. Unblock #2459671: [PP-1] Add detail to AlreadyInstalledException

User interface changes

N/A

API changes

Deprecate the TranslationInterface argument to InstallederException::__construct() and child classes like AlreadyInstalledException

Data model changes

N/A

Release notes snippet

N/A

Comments

dww created an issue. See original summary.

dww’s picture

Title: Remove the StringTranslationTrait from AlreadyInstalledException » Remove the StringTranslationTrait from InstallerException
Issue summary: View changes

I missed. ;)

dww’s picture

Status: Active » Needs review
Issue tags: +Needs change record
StatusFileSize
new3.12 KB

Something like this?

dww’s picture

StatusFileSize
new4.9 KB
new2.33 KB

Sorry, that was doomed to fail. ;) Let's try this.

andypost’s picture

It needs CR and test for deprecations
Maybe instead of getting argument it's enough just get count of arguments first? So no @ needed

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new143 bytes

The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.