Closed (fixed)
Project:
Drupal core
Version:
10.3.x-dev
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 May 2018 at 01:55 UTC
Updated:
27 Dec 2024 at 14:53 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
alexpottI think the whole concept of getBaseThemes() on both the ThemeHandler and the ThemeExtensionList is not needed. The function signature of having to provide a list of themes to search for sub themes is very odd because both of these things have lists of themes ?!!?
I think this probably needed before we had \Drupal\Core\Theme\ActiveTheme::getBaseThemes() but it appears obsolete now.
Comment #4
andyposterror in "list" message - copy/paste from handler
Comment #5
andypostLooks there's no need at all in gathering base themes
Comment #6
alexpottNice catch.
Comment #15
needs-review-queue-bot commentedThe 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.
Comment #19
dimitriskr commentedComment #20
smustgrave commentedFor good practice we should still use the standard issue summary template.
Comment #21
dimitriskr commentedComment #22
dimitriskr commentedComment #23
smustgrave commentedStill is tagged for change record updates from a few years back.
Comment #24
dimitriskr commentedUpdated the CR too
Comment #25
smustgrave commentedSo I think this needs it's own change record.
The current one is published and said it was introduced in 8.7 which isn't the case for this. So methods have been deprecated in 8.7 and no 10.3 I'm just worried that would be confusing.
Will post in slack also.
Comment #26
dimitriskr commentedComment #27
quietone commentedYes, this should have it's own change record. Any changes to the original change record should be moved to the new one so that the dates and version/branch of each change record is correct.
Comment #28
dimitriskr commentedUpdated remaining tasks in IS
Comment #29
smustgrave commentedAdditional CR looks fine, made some tweaks to make it clear when it was deprecated and removed.
Comment #30
longwaveWhat is the reason for keeping this until Drupal 12? We are OK to deprecate in 10.3.0 for removal in 11.0.0, except where we think things might be widely used or difficult to remove, but this one looks straightforward.
Comment #31
smustgrave commentedBelieve there is a slack discussion around this. But moving to NW as the MR is unmergable.
Comment #33
kostyashupenkoResolved conflicts / rebased
Comment #34
dimitriskr commentedComment #35
dimitriskr commentedEdit: removal stays in D12
Comment #37
andypostFixed https://wiki.php.net/rfc/make-reflection-setaccessible-no-op
Comment #38
smustgrave commentedApplied a simple :void to the test, but deprecation seems correct.
Comment #39
longwaveCommitted and pushed 1e80a22b06 to 11.x and 5e778473f4 to 10.3.x. Thanks!
Also published the change record.
Comment #43
longwaveComment #44
longwaveComment #45
longwaveThird time lucky, issue credits got swallowed up by d.o somehow.
Comment #47
nitesh624We are also using this function in our custom module. But after deprecation there are no replacements suggested here.
So Is there any alternate workaround to achieve this?
Comment #48
andypostBefore looking for workarounds please consider if you really need this method as it very internal to
ThemeExtensionList::doGetBaseThemes()which you can decorate/access in a hacky wayBut custom code is not expected to use this method
Comment #49
nitesh624Thanks for reply andy.
Yes for our use case it might be needed as we are creating some predefined block based to the base theme condition in
hook_theme_installed()hook.Comment #50
joseph.olstadHmm, my theme is heavily using the getBaseThemes and I would like to avoid a major refactor. So you're saying it's possible to decorate
ThemeExtensionList::doGetBaseThemes()in order to do what getBaseThemes does?I'm seeing doGetBaseThemes in
core/lib/Drupal/Core/Extension/ThemeExtensionList.phpand there's a test for it in
core/tests/Drupal/Tests/Core/Extension/ThemeExtensionListTest.phpMakes me wonder what the rationale for this change is/was?
***EDIT***
I was hoping to use the russian Drupal code grepper to find usages elsewhere but it's currently offline. Other search tools available for contrib are a bit clunky and slow.
***END EDIT***