Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
system.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Mar 2020 at 18:47 UTC
Updated:
27 Oct 2025 at 21:49 UTC
Jump to comment: Most recent
Comments
Comment #2
tim.plunkettHere's what I removed from my review of the backport.
Why is $extension_list by reference?
Ohhh no, is that doing what I think it's doing? Is that so it can reuse the anonymous function but with two different objects?
Ew.
Let's not do that, please. It's not worth the DRY effort when it's that tricky and involves references.
s/Date/Data
Not a big deal, but why getEditable? Just catches my eye when I see that without a save()
Either use the local variable (+1) or don't, but not both.
Nit: not t() in tests like this
Don't usually put these on our assert helpers.
Nittiest of nits, but
for ($i = 0; $i < 2; $i++) {is a lot more legible IMO. Then I know that $reload isn't a magic number, and also I can tell it runs twice instead of thinking about it.
Let's be consistent with the others: "Data provider for ..."
Comment #8
tim.plunkettComment #12
mstrelan commentedAddressed all the items in #2, except #2.5 which was already fixed. I also converted the anonymous functions to arrow functions at the same time.
Comment #13
smustgrave commentedCan we update the summary.
Thanks!
Comment #14
mstrelan commentedTranscribed the proposed resolution from #2
Comment #15
smustgrave commentedThanks! Seems like a good clean up to me
Comment #16
smustgrave commentedAppears to need a rebase.
Comment #17
catchComment #18
mstrelan commentedRebased and swapped
!in_array($extension_name, array_keys(DRUPAL_CORE_REMOVED_THEME_LIST), TRUE)to!array_key_exists($extension_name, DRUPAL_CORE_REMOVED_THEME_LIST).Wondering if it makes sense to move DRUPAL_CORE_REMOVED_MODULE_LIST and DRUPAL_CORE_REMOVED_THEME_LIST constants to this class while we're at it. It's not part of the original scope, but not sure that matters. The only place they are used is in SystemRequirements and UpdateScriptTest.
Comment #19
smustgrave commentedSeems like a good rebase
Comment #20
catchI'm fine with doing the constants here or a follow-up, but if we do them in a follow-up let's open an issue for that prior to commit.
Comment #21
mstrelan commentedMoved the constants here. Had to make them public because they are access from
UpdateScriptTest.There are no usages of them in contrib projects (outside of
core/modules/system):https://git.drupalcode.org/search?group_id=2&scope=blobs&search=DRUPAL_C...
https://git.drupalcode.org/search?group_id=2&scope=blobs&search=DRUPAL_C...
Comment #22
smustgrave commentedProbably be good to get this in before the next batch modules I'd imagine.
Comment #23
alexpottCommitted 0a65712 and pushed to 11.x. Thanks!
Comment #26
alexpottI checked for usages of the constants in system.install and there are none in contrib. Also as the constants are not always available and very internal I don't think a CR is necessary.