Problem/Motivation

We have opened multiple issues planning to deprecate themes:

  1. #2659890: [Policy] [Plan] Drupal 9 and 10 markup and CSS backwards compatibility Will likely introduce a new Stable for Drupal 9 meaning that the Drupal 8 Stable should be deprecated on Drupal 9.0.0.
  2. #3050378: [meta] Replace Classy with a starterkit theme Plans to replace Classy with a starterkit.
  3. #3084814: Deprecate Seven theme Plans to replace Seven with a new admin theme.

These are blocked or will be blocked by the fact that at the moment we don't have any documentation on what is the process for deprecating themes..

Proposed resolution

Document process for deprecating themes.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3084816

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lauriii created an issue. See original summary.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

bnjmnm’s picture

Assigned: Unassigned » bnjmnm
StatusFileSize
new3.42 KB

Assigning to myself to avoid possible duplication of work. I have a patch almost ready but likely won't be able to post until tomorrow.

bnjmnm’s picture

Assigned: bnjmnm » Unassigned
Status: Active » Needs review
StatusFileSize
new2.97 KB

Here's a possible approach.

lauriii’s picture

Status: Needs review » Needs work
--- a/core/lib/Drupal/Core/Extension/ThemeInstaller.php
+++ b/core/lib/Drupal/Core/Extension/ThemeInstaller.php

@@ -153,6 +153,10 @@ public function install(array $theme_list, $install_dependencies = TRUE) {
+        @trigger_error(str_replace('%theme_id%', $key, $theme_data[$key]->info['deprecated']), E_USER_DEPRECATED);

I'm not sure if it's enough for us to trigger the deprecation warning during the theme installation process. It would be great if this information would be available for already installed themes as well.

bnjmnm’s picture

Status: Needs work » Needs review
StatusFileSize
new5.41 KB
new2.96 KB

I'm not sure if it's enough for us to trigger the deprecation warning during the theme installation process.

Agreed - I was having difficulty finding a good place for it that doesn't trigger tons of deprecation errors, but a good location (or at least a better one) finally occurred to me.

lauriii’s picture

We could potentially follow the path that this issue is taking: #3062302: Properly deprecate the entity reference module. This would be better because it would trigger the error whenever the theme is being used, rather than just on the appearance page. Any thoughts?

bnjmnm’s picture

StatusFileSize
new5.06 KB
new2.54 KB

The suggestion in #8 led to a much simpler approach.

I also tried this out with every core theme and the deprecation warning successfully appears for each theme using only existing tests - something I assumed would be the case but it's nice to have confirmation of.

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

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

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.

sakthivel m’s picture

StatusFileSize
new1.48 KB

#13 Just re-roll the patch

Status: Needs review » Needs work

The last submitted patch, 13: 3084816-13.patch, failed testing. View results

sakthivel m’s picture

Status: Needs work » Needs review
andypost’s picture

Status: Needs review » Postponed
Issue tags: -Drupal 9 +Drupal 10
Parent issue: » #3124762: Add 'lifecycle' key to .info.yml files
xjm’s picture

Status: Postponed » Needs work

That's in!

bnjmnm’s picture

Moved #9 to a merge request.

The reroll in #13 was unnecessary as #9 still applies to later version of core, and it also breaks the patch as two necessary files were excluded from.

I noticed another unnecessary reroll you made in #2939985: Remove non-existent dependency core/collapse in claro.libraries.yml. If you'd like to determine if a reroll is necessary, simply go to the most recent patch, click its "Add test/retest" link, then choose "custom parameters" with the most recent branch of Drupal. If you get an error that the patch doesn't apply, then it needs a reroll.

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.

gábor hojtsy’s picture

With #3124762: Add 'lifecycle' key to .info.yml files in, #3215043: Indicate the non-stable statuses in admin/modules page RTBC and #3250585: Highlight deprecated modules and themes at admin/reports/status page, providing warning and link with explanation being actively worked on, what else is needed here. There is a way to mark a theme deprecated now, but its not surfaced for users. Should it be? It appears the thinking in the existing issues has been that we don't want to expose that to users since it is perfectly fine to use a deprecated theme.

Upgrade status already exposes obsolete and deprecated extensions for a while, see #3223453: Check for uses of deprecated and obsolete projects based on the lifecycle info file key.

catch’s picture

I think we still might need #3215044: Promote the non-stable statuses in admin/appearance page, optionally even visually, but I don't think there's anything else here that's not covered by the lifecycle key, so marking duplicate.