Improve the speed of \Drupal\Core\Theme\ThemeAccessCheck [#2538970] | Drupal.org
Skip to search
Can we use first and third party cookies and web beacons to
understand our audience, and to tailor promotions you see
Improve the speed of \Drupal\Core\Theme\ThemeAccessCheck
Fixed
Project:
Drupal core
Version:
11.x-dev
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Performance
about tags
Performance
It affects
performance
. It is often combined with the
Needs profiling
tag.
Reporter:
dawehner
Created:
24 Jul 2015 at 07:54 UTC
Updated:
22 Apr 2026 at 22:14 UTC
Jump to comment:
Most recent
Most recent file
Problem/Motivation
You need to check at least once per request whether the active theme you use is enabled.
Currently this is done by loading all theme info.
Proposed resolution
Use the theme list in the container, this avoids two cache gets on almost every HTML response.
Remaining tasks
User interface changes
API changes
Data model changes
Comment
File
Size
Author
#54
2538970-nr-bot_u69kj25c.txt
1.32 KB
needs-review-queue-bot
#47
2538970-nr-bot_89hs2u3k.txt
893 bytes
needs-review-queue-bot
#38
Screenshot from 2026-04-09 17-39-31.png
301.83 KB
catch
#38
Screenshot from 2026-04-09 17-39-21.png
290.67 KB
catch
#17
histogram_interleaved.png
9.29 KB
wim leers
#17
histogram_facet.png
9.61 KB
wim leers
#11
interdiff.txt
818 bytes
claudiu.cristea
#10
2538970-10.patch
4.09 KB
claudiu.cristea
#10
2538970-10.patch
4.09 KB
claudiu.cristea
#7
interdiff.txt
645 bytes
claudiu.cristea
#6
improve_the_speed_of-2538970-6.patch
3.85 KB
claudiu.cristea
#3
2538982-1.patch
3.22 KB
dawehner
Issue fork
drupal-2538970
Show commands
Start within a Git clone of the project using the
version control instructions
Add & fetch this issue fork’s repository
Or,
if you do not have
SSH keys set up on git.drupalcode.org
Add & fetch this issue fork’s repository
2 hidden branches
2538970-improve-the-speed
plain diff
MR
!15403
Check out this branch for the first time
Check out existing branch, if you already have it locally
2538970-theme-access-check-nightwatch-fix
plain diff
MR
!15405
Check out this branch for the first time
Check out existing branch, if you already have it locally
About issue forks
Comments
Comment
#1
dawehner
German
commented
24 July 2015 at 07:57
Note, this improves not nothing, but it doesn't change the overall time yet, because
#2531958: Try to do less in theme_get_settings() on every request
also lists all of it.
Function Name
Calls Diff
Calls
Diff%
Incl. Wall
Diff
(microsec)
IWall
Diff%
Incl.
MemUse
Diff
(bytes)
IMemUse
Diff%
Incl.
PeakMemUse
Diff
(bytes)
IPeakMemUse
Diff%
Current Function
Drupal\Core\Theme\ThemeAccessCheck::checkAccess
0.0%
-95
-16.8%
-61,816
-108.7%
72
0.1%
Exclusive Metrics
Diff
for Current Function
6.3%
-44,400
-71.8%
0.0%
Parent function
Drupal\Core\Theme\ThemeNegotiator::determineActiveTheme
N/A%
-95
-100.0%
-61,816
-100.0%
72
100.0%
Child functions
Drupal\Core\Extension\ThemeHandler::listInfo
-1
-100.0%
-243
-255.8%
-76,856
-124.3%
-51,896
-72077.8%
Drupal\Core\Theme\ThemeInitialization::getActiveThemeByName
100.0%
142
149.5%
58,752
95.0%
51,968
72177.8%
Drupal\Core\Theme\ActiveTheme::getStatus
100.0%
0.0%
688
1.1%
0.0%
or
to post comments
Comment
#2
fabianx
commented
24 July 2015 at 08:27
Is there a patch to review?
or
to post comments
Comment
#3
dawehner
German
commented
24 July 2015 at 08:53
Status:
Active
» Needs review
Status
File
Size
new
2538982-1.patch
3.22 KB
Ehm sure here it is. Ignore the NID of the patch :)
or
to post comments
Comment
#4
24 July 2015 at 09:28
Status:
Needs review
» Needs work
The last submitted patch,
3: 2538982-1.patch
, failed testing.
or
to post comments
Comment
#5
fabianx
commented
24 July 2015 at 09:48
Looks great, just need to fix the test failures.
or
to post comments
Comment
#6
claudiu.cristea
Romanian
Arad 🇷🇴
commented
26 July 2015 at 10:42
Status:
Needs work
» Needs review
Status
File
Size
new
improve_the_speed_of-2538970-6.patch
3.85 KB
1 file was hidden/shown/deleted
Status
File
Size
hidden
2538982-1.patch
3.22 KB
The problem with the tests is because of the architecture of
ThemeInitialization::getActiveThemeByName()
. When
ThemeInitialization::getActiveThemeByName()
tries to return a theme that is not installed he calls
ThemeInitialization::getActiveTheme()
with a fake theme called
core
. From my point of view this a bad design but this is not subject of this issue.
or
to post comments
Comment
#7
claudiu.cristea
Romanian
Arad 🇷🇴
commented
26 July 2015 at 10:41
Status
File
Size
new
interdiff.txt
645 bytes
Forgot the interdiff.
or
to post comments
Comment
#8
dawehner
German
commented
26 July 2015 at 11:11
Good observation ... I'll dig into that later, but yeah we should fix the design there properly.
or
to post comments
Comment
#9
dawehner
German
commented
29 July 2015 at 11:31
The problem with the tests is because of the architecture of ThemeInitialization::getActiveThemeByName(). When ThemeInitialization::getActiveThemeByName() tries to return a theme that is not installed he calls ThemeInitialization::getActiveTheme() with a fake theme called core. From my point of view this a bad design but this is not subject of this issue.
Do you mind opening up an issue for that?
+++ b/core/lib/Drupal/Core/Theme/ThemeInitialization.php
@@ -160,6 +160,7 @@ public function getActiveTheme(Extension $theme, array $base_themes = []) {
+ $values['status'] = $values['name'] != 'core';
So if its core its disabled? We should have a least some form of documentation
or
to post comments
Comment
#10
claudiu.cristea
Romanian
Arad 🇷🇴
commented
4 August 2015 at 10:12
Status
File
Size
new
2538970-10.patch
4.09 KB
new
2538970-10.patch
4.09 KB
1 file was hidden/shown/deleted
Status
File
Size
hidden
improve_the_speed_of-2538970-6.patch
3.85 KB
New issue created
#2545192: Don't assign 'core' to a theme that cannot be negotiated or is not in the installed theme list
Added some docs as you suggested in
#9
or
to post comments
Comment
#11
claudiu.cristea
Romanian
Arad 🇷🇴
commented
4 August 2015 at 10:13
Status
File
Size
new
interdiff.txt
818 bytes
2 files were hidden/shown/deleted
Status
File
Size
hidden
interdiff.txt
645 bytes
hidden
2538970-10.patch
4.09 KB
Ouch!
or
to post comments
Comment
#12
4 August 2015 at 10:14
Status:
Needs review
» Needs work
The last submitted patch,
10: 2538970-10.patch
, failed testing.
or
to post comments
Comment
#13
claudiu.cristea
Romanian
Arad 🇷🇴
commented
4 August 2015 at 10:16
Status:
Needs work
» Needs review
Accidentally I added the same patch twice in
#10
. Back to NR.
or
to post comments
Comment
#14
dawehner
German
commented
4 August 2015 at 22:13
This looks alright for me now, but yeah I fear we need to provide some benchmarking + beta evaluation to judge whether this is useful.
Note: if you have more themes enabled, (which is the workflow if you have the themekey module, you end up in those kind of problems
or
to post comments
Comment
#15
claudiu.cristea
Romanian
Arad 🇷🇴
commented
6 August 2015 at 14:41
@dawehner, can you point me to some docs, best practices, writeups on how to provide an acceptable benchmark?
or
to post comments
Comment
#16
claudiu.cristea
Romanian
Arad 🇷🇴
commented
6 August 2015 at 14:48
Issue tags:
needs profiling
or
to post comments
Comment
#17
wim leers
Ghent 🇧🇪🇪🇺
commented
7 August 2015 at 08:44
Issue tags:
needs profiling
Status
File
Size
new
histogram_facet.png
9.61 KB
new
histogram_interleaved.png
9.29 KB
I'm afraid this is a dead end :(
EDIT: tested with 1000 requests to
/contact
, as the anon users, with page cache off.
Before
Requests per second: 14.11 [#/sec] (mean)
Time per request: 70.888 [ms] (mean)
Time per request: 70.888 [ms] (mean, across all concurrent requests)
Transfer rate: 195.59 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 68 71 1.2 71 76
Waiting: 60 64 1.2 63 69
Total: 68 71 1.2 71 76
Percentage of the requests served within a certain time (ms)
50% 71
66% 71
75% 71
80% 72
90% 72
95% 73
98% 74
99% 75
100% 76 (longest request)
After
Requests per second: 13.93 [#/sec] (mean)
Time per request: 71.765 [ms] (mean)
Time per request: 71.765 [ms] (mean, across all concurrent requests)
Transfer rate: 193.20 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 67 72 1.3 71 78
Waiting: 60 64 1.3 64 71
Total: 67 72 1.3 72 78
Percentage of the requests served within a certain time (ms)
50% 72
66% 72
75% 72
80% 73
90% 73
95% 74
98% 75
99% 76
100% 78 (longest request)
or
to post comments
Comment
#18
dawehner
German
commented
7 August 2015 at 08:57
a) to be clear
#2531958: Try to do less in theme_get_settings() on every request
still has a listInfo call, so this is why things are a bit slower here
b) This doesn't tell us any statistically relevant data, see standard derivation. We need to have more iterations in order to tell something properly
or
to post comments
Comment
#19
joelpittet
he/him
Vancouver
commented
28 November 2015 at 03:04
Here's what I got with the
/contact
as the front page. xdebug and all caching turned off. Twig debug turned off and twig caching still on.
Also I enabled all the modules and a few contrib modules too but still accessing that page anonymous so it shouldn't make I difference I'd expect.
=== 8.0.x..8.0.x compared (5659123816918..565914310b034):
ct : 170,827|170,827|0|0.0%
wt : 632,030|633,399|1,369|0.2%
mu : 33,371,040|33,373,152|2,112|0.0%
pmu : 35,105,000|35,107,632|2,632|0.0%
=== 8.0.x..themeaccesscheck compared (5659123816918..5659177493c27):
ct : 170,827|170,851|24|0.0%
wt : 632,030|640,893|8,863|1.4%
mu : 33,371,040|33,387,336|16,296|0.0%
pmu : 35,105,000|35,121,464|16,464|0.0%
=== SUM: 8_0_x-summary..themeaccesscheck-summary compared (565918537d922..5659186b7d6e0):
ct : 17,091,157|17,093,710|2,553|0.0%
wt : 69,237,937|69,699,950|462,013|0.7%
mu : 3,337,669,336|3,339,222,864|1,553,528|0.0%
pmu : 3,511,345,104|3,512,874,752|1,529,648|0.0%
8_0_x-summary..themeaccesscheck-summary
or
to post comments
Comment
#20
28 November 2015 at 03:04
Version:
8.0.x-dev
» 8.1.x-dev
Drupal 8.0.6
was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes.
Drupal 8.1.0-rc1
is now available and sites should prepare to update to 8.1.0.
Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the
Drupal 8 minor version schedule
and the
Allowed changes during the Drupal 8 release cycle
or
to post comments
Comment
#21
28 November 2015 at 03:04
Version:
8.1.x-dev
» 8.2.x-dev
Drupal 8.1.9
was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes.
Drupal 8.2.0-rc1
is now available and sites should prepare to upgrade to 8.2.0.
Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the
Drupal 8 minor version schedule
and the
Allowed changes during the Drupal 8 release cycle
or
to post comments
Comment
#22
28 November 2015 at 03:04
Version:
8.2.x-dev
» 8.3.x-dev
Drupal 8.2.6
was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (
Drupal 8.3.0-alpha1
is available for testing.)
Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the
Drupal 8 minor version schedule
and the
Allowed changes during the Drupal 8 release cycle
or
to post comments
Comment
#23
28 November 2015 at 03:04
Version:
8.3.x-dev
» 8.4.x-dev
Drupal 8.3.6
was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (
Drupal 8.4.0-alpha1
is available for testing.)
Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the
Drupal 8 minor version schedule
and the
Allowed changes during the Drupal 8 release cycle
or
to post comments
Comment
#24
joelpittet
he/him
Vancouver
commented
25 September 2017 at 13:31
Status:
Needs review
» Needs work
@claudiu.cristea is there something else we could test directly because page hits aren't significantly different it seems from the tests above.
Setting to NW for update to profiling scenario/instructions.
or
to post comments
Comment
#25
25 September 2017 at 13:31
Version:
8.4.x-dev
» 8.5.x-dev
Drupal 8.4.4
was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (
Drupal 8.5.0-alpha1
is available for testing.)
Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the
Drupal 8 minor version schedule
and the
Allowed changes during the Drupal 8 release cycle
or
to post comments
Comment
#26
25 September 2017 at 13:31
Version:
8.5.x-dev
» 8.6.x-dev
Drupal 8.5.6
was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (
Drupal 8.6.0-rc1
is available for testing.)
Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the
Drupal 8 minor version schedule
and the
Allowed changes during the Drupal 8 release cycle
or
to post comments
Comment
#27
25 September 2017 at 13:31
Version:
8.6.x-dev
» 8.8.x-dev
Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.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
or
to post comments
Comment
#28
25 September 2017 at 13:31
Version:
8.8.x-dev
» 8.9.x-dev
Drupal 8.8.7
was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to
Drupal 8.9.0
or
Drupal 9.0.0
for ongoing support.
Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should 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
or
to post comments
Comment
#29
25 September 2017 at 13:31
Version:
8.9.x-dev
» 9.2.x-dev
Drupal 8 is end-of-life as of November 17, 2021
. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the
Drupal core minor version schedule
and the
Allowed changes during the Drupal core release cycle
or
to post comments
Comment
#30
25 September 2017 at 13:31
Version:
9.2.x-dev
» 9.3.x-dev
or
to post comments
Comment
#31
25 September 2017 at 13:31
Version:
9.3.x-dev
» 9.4.x-dev
Drupal 9.3.15
was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should 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
or
to post comments
Comment
#32
25 September 2017 at 13:31
Version:
9.4.x-dev
» 9.5.x-dev
Drupal 9.4.9
was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should 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
or
to post comments
Comment
#33
25 September 2017 at 13:31
Version:
9.5.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. For more information, see the
Drupal core minor version schedule
and the
Allowed changes during the Drupal core release cycle
or
to post comments
Comment
#34
andypost
he/him
Russian
commented
2 May 2025 at 11:53
Related issues:
#2531958: Try to do less in theme_get_settings() on every request
or
to post comments
Comment
#35
2 May 2025 at 11:53
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
or
to post comments
Comment
#36
catch
he/him
commented
9 April 2026 at 16:39
This is still valid, but we have a container parameter with a list of themes now, so I can't see a reason not to use that.
or
to post comments
Comment
#37
9 April 2026 at 16:51
catch
opened
merge request !15403
or
to post comments
Comment
#38
catch
he/him
commented
9 April 2026 at 16:58
Status:
Needs work
» Needs review
Status
File
Size
new
Screenshot from 2026-04-09 17-39-21.png
290.67 KB
new
Screenshot from 2026-04-09 17-39-31.png
301.83 KB
Attaching xhprof (xhgui) screenshots. This appears to save about 1ms from each request, the call chain is via the theme cache context.
or
to post comments
Comment
#39
longwave
he/him
UK
commented
9 April 2026 at 17:20
Status:
Needs review
» Needs work
One of the Nightwatch tests consistently fails while trying to install a theme, so I wonder if this has a subtle side effect somewhere?
or
to post comments
Comment
#40
catch
he/him
commented
9 April 2026 at 21:31
Status:
Needs work
» Needs review
The nightwatch failure is because the nightwatch install theme command relies on a controller that changes the default/admin theme in a GET request then immediately renders a response - the active theme is determined after the new theme is installed, but the ThemeAccess service isn't refreshed with the new container parameter afaik.
I can't see any obvious way to force this to be refreshed, or even to workaround it in the test, so for now removed the dependency injection so that the list of themes is got from the container at the very last minute.
or
to post comments
Comment
#41
godotislate
he/him
commented
9 April 2026 at 21:43
I wonder that if
#3481903: Support hooks (Hook attribute) in any registered service
can land (though there are some challenges), then services can implement
hook_modules_installed()
and/or
hook_themes_installed()
and refresh their properties from the new container there.
or
to post comments
Comment
#42
9 April 2026 at 22:10
longwave
opened
merge request !15405
or
to post comments
Comment
#43
longwave
he/him
UK
commented
9 April 2026 at 22:19
We don't need an entire support module to handle changing the theme for exactly three Nightwatch tests. MR!15405 removes the module and just uses /admin/appearance to change the theme.
Claude Code wrote the change to drupalEnableTheme.js.
or
to post comments
Comment
#44
catch
he/him
commented
10 April 2026 at 06:11
OK better explanation (mostly in a code comment now).
Access checkers all get constructed when the event dispatcher needs them - this happens before the controller method is called, e.g. when checking access to the route or similar.
The controller method installs a theme then immediately sets it as the admin theme - and the controller is an admin page.
Theme negotiation happens
after
the method is called, but the access check service has already been constructed before the controller method is called. This means that the theme isn't in the list of themes passed to the access checker.
This all means we can workaround the bug in the nightwatch test module, I find it very unlikely that any equivalent code exists anywhere else.
There are probably cleaner ways to fix it though:
1. In the theme negotiatior, instead of injecting the access checker service, we could inline the logic - the actual logic is one line. This assumes the theme negotiator will be fresh from the container, which it might not.
2. To be honest I don't understand the point of this access check during theme negotiation altogether - how does an uninstalled theme get passed in the first place? Going to open an issue to look into removing it.
or
to post comments
Comment
#45
catch
he/him
commented
10 April 2026 at 06:14
Still had the tab open and crossposted with #43.
Dropping the support module seems fine too, although I managed to get things isolated to the support module now so that could also be a follow-up. We have two issues open to replace these nightwatch tests anyway.
Going to open the follow-up to see whether the theme access check is really necessary too.
or
to post comments
Comment
#46
catch
he/him
commented
10 April 2026 at 06:20
Opened
#3584064: Check whether ThemeAccess check during theme negotiation is necessary
or
to post comments
Comment
#47
needs-review-queue-bot
commented
13 April 2026 at 14:55
Status:
Needs review
» Needs work
Status
File
Size
new
2538970-nr-bot_89hs2u3k.txt
893 bytes
The
Needs Review Queue Bot
tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the
Drupal Contributor Guide
to find step-by-step guides for working with issues.
or
to post comments
Comment
#48
catch
he/him
commented
13 April 2026 at 15:07
Issue summary:
View changes
Status:
Needs work
» Needs review
or
to post comments
Comment
#49
catch
he/him
commented
13 April 2026 at 15:15
Issue summary:
View changes
or
to post comments
Comment
#50
berdir
German
Switzerland
commented
13 April 2026 at 15:26
How do you suggest we proceed with this in light of
#3584064: Check whether ThemeAccess check during theme negotiation is necessary
? if we remove the need for it entirely or put it in an asser(), do we still do this too?
or
to post comments
Comment
#51
catch
he/him
commented
13 April 2026 at 16:22
We need to figure out whether we need bc or not in that issue, so for me I'd go ahead here since it's a simple change, then keep going over there. If we go with an assert() in the other issue, it would be better to assert the simple check added here rather than the logic in HEAD too.
or
to post comments
Comment
#52
berdir
German
Switzerland
commented
14 April 2026 at 09:17
Status:
Needs review
» Needs work
After thinking about it, I think it makes sense to do this as well. Especially if we only make it an assert() then it would mean that performance tests would have different results depending on whether or not assert is enabled and profiling is often done with assert on and then could lead people down a wrong path.
Added one question about BC on the constructor. I'd suggest doing this, not really because of possible subclasses but more so for handling updates with an existing container. This would probably break pretty hard when trying to access the site without a cache clear.
or
to post comments
Comment
#53
catch
he/him
commented
14 April 2026 at 09:46
Status:
Needs work
» Needs review
I don't think we need to provide bc for subclasses, but handling the stale container sounds good. While core updates usually for a container rebuild immediately via the container cache key, some sites set manual deployment identifiers and might forget. Added a commit for that.
or
to post comments
Comment
#54
needs-review-queue-bot
commented
14 April 2026 at 14:44
Status:
Needs review
» Needs work
Status
File
Size
new
2538970-nr-bot_u69kj25c.txt
1.32 KB
The
Needs Review Queue Bot
tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the
Drupal Contributor Guide
to find step-by-step guides for working with issues.
or
to post comments
Comment
#55
catch
he/him
commented
14 April 2026 at 14:54
Status:
Needs work
» Needs review
or
to post comments
Comment
#56
berdir
German
Switzerland
commented
14 April 2026 at 18:41
Status:
Needs review
» Reviewed & tested by the community
Thanks. For constructor parameters with BC, I prefer not promoting them directly, this means we can't set the type on that because of BC, but I think it's OK either way.
or
to post comments
Comment
#57
catch
he/him
commented
17 April 2026 at 08:52
Yeah I went for 'least amount of change', technically we could use a union type in the constructor, but then the property itself would have the union type so not sure that's much better either. Given the constructor is internal and so is the class (even though it's injected in core, it's a tagged service really) not sure it matters much.
or
to post comments
Comment
#58
17 April 2026 at 08:52
catch
changed the visibility of the branch
2538970-theme-access-check-nightwatch-fix
to
hidden
or
to post comments
Comment
#59
catch
he/him
commented
17 April 2026 at 08:56
I've hidden @longwave's branch with the nightwatch refactor but I added a note on
#3553673: Migrate from Nightwatch to Playwright (and phpunit Axe) tests
that the playwright conversion should tackle it.
or
to post comments
Comment
#60
22 April 2026 at 22:08
godotislate
closed
merge request !15403
or
to post comments
Comment
#61
22 April 2026 at 22:08
godotislate
committed
7a031e39
on
main
refactor: #2538970 Improve the speed of \Drupal\Core\Theme\...
or
to post comments
Comment
#62
22 April 2026 at 22:09
godotislate
committed
d3126dbc
on
11.x
refactor: #2538970 Improve the speed of \Drupal\Core\Theme\...
or
to post comments
Comment
#63
godotislate
he/him
commented
22 April 2026 at 22:10
Status:
Reviewed & tested by the community
» Fixed
Made two suggestions and applied them myself because they were minor changes to comments.
Committed and pushed
7a031e3
to main and
d3126db
to 11.x. Thanks!
or
to post comments
Comment
#64
22 April 2026 at 22:10
Now that this issue is closed,
review the
contribution record
As a contributor, attribute any organization that helped you, or if you volunteered your own time.
Maintainers, credit people who helped resolve this issue.
or
to post comments
Comment
#65
godotislate
he/him
commented
22 April 2026 at 22:14
Version:
main
» 11.x-dev
or
to post comments
Contribution record
Add child issue
clone issue
Related issues
Referenced by
#1177762: Deprecate automatic template_preprocess discovery and 'includes'/'file' support from hook_theme()
#2470679: [meta] Identify necessary performance optimizations for common profiling scenarios
#2545192: Don't assign 'core' to a theme that cannot be negotiated or is not in the installed theme list
#3015812: Introduce new Theme extension object and properly deprecate REGIONS_VISIBLE and REGIONS_ALL
#3539161: Static cache access policy checking
Infrastructure management for Drupal.org provided by
Need a Drupal 7 extended support partner? Consider Tag1.
News items
News
Planet Drupal
Social media
Sign up for Drupal news
Security advisories
Jobs
Our community
Community
Services
Training
Hosting
Contributor guide
Groups & meetups
DrupalCon
Code of conduct
Documentation
Documentation
Drupal Guide
Drupal User Guide
Developer docs
API.Drupal.org
Drupal code base
Download & Extend
Drupal core
Modules
Themes
Distributions
Governance of community
About
Web accessibility
Drupal Association
About Drupal.org
Drupal is a
registered trademark
of
Dries Buytaert