Closed (fixed)
Project:
Drupal core
Version:
9.4.x-dev
Component:
extension system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Nov 2021 at 08:49 UTC
Updated:
6 Feb 2022 at 10:59 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
spokjeThis is a 1-on-1 copy of patch
3215045-28.patchfrom #3215045: [Duplicate] Highlight obsolete module's status at admin/reports/status page, providing warning and link with explanationComment #3
spokjeComment #4
longwaveDo we need any BC here, or are we assuming that only core provided experimental modules and themes?
Should this be moved to a method on the value object, so we can just call
->isExperimental()? This code is duplicated in a few places.edit: there is no value object that handles
->info, this is blocked by #3015812: Introduce new Theme extension object and properly deprecate REGIONS_VISIBLE and REGIONS_ALLComment #5
spokjeThanks @longwave!
#4.1: There is a child follow-up issue for that, currently postponed: #3250342: Deprecate "experimental: true" in .info.yml.
That issue was created upon @Gábor Hojtsy requested by in 3215045.#23
Would that be good enough to answer your question?
#4.2: Addressed in attached patch.
Comment #6
spokjeD'oh!
Comment #7
karishmaamin commentedTried to fixed custom code failure #6
Comment #8
longwaveSo if we're going to do #3250342: Deprecate "experimental: true" in .info.yml I think we need to leave the code that handles
experimental: truealone in this issue and addlifecycle: experimentalas an additional way of flagging experimental extensions, so modules/themes can use either until Drupal 10.Comment #9
spokje@longwave: Makes complete sense, let me see what I can do.
Comment #10
spokjeComment #11
spokjeThat could have gone better...
Comment #12
spokjeSearching for green TestBot.
Comment #13
spokjeDrupal\Core\Extension\Extension::isExperimentalshould now take care of bothlifecycle: experimentalandexperimental: true.Comment #14
quietone commentedWhat is happening to the 'experimental;' property? Deprecation? If so, then more work for that. Would be nice to have that in the proposed resolution.
I think this needs a comment explaining why two properties are being tested. And if one is being removed then an @todo to the followup.
Let's move this below the comment, and change the comment. See below.
This comment, and the one below for themes, needs updating because the code is now doing experimental and obsolete.
Comment #15
spokjeThanks @quietone for the review
It will be deprecated properly in #3250342: Deprecate "experimental: true" in .info.yml. Added the section Proposed resolution in the IS explaining what's going on in this issue and mentioning the deprecation issue.
I've (hopefully) addressed points 1. through 3, where I took the liberty of going a slightly different route with 2. and 3. than suggested.
Comment #16
spokjeComment #17
spokjeComment #18
longwaveLet's put the @todo here as well.
Do we need a legacy experimental test theme in order to keep testing
experimental: true?Comment #19
spokjeThanks @longwave, fair points.
Regarding:
We're going to need one anyway to test the deprecation we're going to create in #3250342: Deprecate "experimental: true" in .info.yml.
Besides that, I can't really argue with the need for a test that
experimental: truewill still work after the changes in this issue.Patch incoming shortly.
Comment #20
spokjeAddressing #18
Comment #21
spokjeComment #22
longwaveThanks, I think this is getting close. Another round of review, mostly nitpicks:
"Data provider for experimental test themes"?
Line needs rewrapping.
Line needs rewrapping.
Do we have a test that covers this?
No \ before string.
Lines need rewrapping.
Comment #23
ankithashettyMade the changes requested in #22, except #22.4, thanks!
Comment #24
spokjeSo the attempt to narrow the scope from #3215045: [Duplicate] Highlight obsolete module's status at admin/reports/status page, providing warning and link with explanation down to "just" swapping out Key/Value pair
experimental: truetolifecycle: experimentalin this issue has failed.We're now just doing the full blown "Highlight obsolete module's status at admin/reports/status page, providing warning and link with explanation" as intended in #3215045: [Duplicate] Highlight obsolete module's status at admin/reports/status page, providing warning and link with explanation.
I'm unsure if we have to move the patch back to that issue, but I'll leave that to bigger brains. If not, we need to update the IS here and probably close #3215045: [Duplicate] Highlight obsolete module's status at admin/reports/status page, providing warning and link with explanation.
Regarding #22.4:
1) Installing
lifecycle: obsoleteisn't even possible, Core throws an exception when trying to do so.We need to look at
lifecycle: deprecated, which means there's an overlap with #3215043: Indicate the non-stable statuses in admin/modules page regarding test modules which are marked aslifecycle: deprecated. Currently there are none, that issues introduces them.To create a test I'm going to copy/paste some of them here, meaning we need a reroll on one of the issues them depending on which one gets committed first, but I don't see another, easier way to do this.
Comment #25
spokjeRegarding #22.5:
Looking at that now, I was wondering where I got that from.
Turns out there are currently 5 occurrences of that line in Core:
Do we need/want a follow-up to remove the backslash from those?
Comment #26
spokjeUsed 3250585-23.patch as base for the new MR.
Comment #28
catch@Spokje I don't have a strong preference for which direction to merge the issues (maybe into this one since the MR is up-to-date), but it would definitely be good to close one or the other as duplicate and update issue summaries/titles if necessary.
Comment #33
gábor hojtsyCarried over the original title from #3215045: [Duplicate] Highlight obsolete module's status at admin/reports/status page, providing warning and link with explanation and updated the issue summary. Also applying credits from there.
Comment #34
gábor hojtsyAlso applying parent and related issue.
Comment #35
gábor hojtsyAlso this applies to all extensions not just modules, so expanding title.
Comment #36
xjmComment #37
xjmLooks like this needs test coverage. We should have test cases for both modules and themes.
Comment #38
spokjeComment #39
catchMaking sure no-one tries to deal with profiles here.
Comment #40
catchThis is blocking deprecation of core modules, so bumping to critical.
Comment #41
spokjeI was waiting on #3215043: Indicate the non-stable statuses in admin/modules page to get committed, since there's a lot of overlap, including tests, in that one, before continuing here,
Having said that, it's a non-assigned issue, so if anybody wants to jump in, please do.
Comment #42
spokjeComment #43
spokjeUpdated MR, but I have no clue how to enable an obsolete extension without triggering the
ObsoleteExtensionExceptionand thus preventing the enabling.Comment #44
bbralaHmm, i wonder if you could just install a deprecated module, then update the lifecycle config to say its obselete instead of using the installer flow.
Comment #45
catchI don't think we need test coverage for that situation, it's what the exception is for. Having some language there for the very rare cases someone manages to do it doesn't hurt either way.
Comment #46
gábor hojtsyAdded this under #3251854: [META] Requirements for tagging Drupal 10.0.0-alpha1 as a should have since it would be really nice to land this before alpha1 as per @catch :)
Comment #47
catchUpdating the title, IMO deprecated modules are the priority here, obsolete would be completely optional because they should never be installed anyway.
Comment #48
quietone commentedAdded deprecated modules and themes as separate warnings, just the same as experimental. The links are just TBD because I didn't like the idea of sending an admin to a core development page about deprecation policy. I haven't searched but this may need a new page that describes the extension lifecycle for an administrator.
Also, added an after screenshot, which includes an obsolete module and theme.
Comment #49
quietone commentedAdded testing of the warning messages. Leaving the needs tests tag because the code for 'obsolete' is still in the MR and maybe we want to test that as well.
Comment #50
quietone commentedLooked at the docs and found two places where information about the lifecycle could be added
Suggestions?
Comment #51
spokjeResolved all threads and updated MR with latest commits from
9.4.x-dev.Comment #52
spokjeComment #53
daffie commentedIn the IS there is nothing about deprecated and/or obsolete modules and/or themes.
Comment #54
gábor hojtsyMade issue summary clearer, inlined screenshot.
I also agree that testing would be impossible for obsolete extensions given you can't install them in the test.
Comment #55
spokjeResolved all threads created by @daffie, hoping that I've explained it clear enough.
Comment #56
spokjeRestoring Status, thanks @Gábor Hojtsy for the IS update.
Comment #57
daffie commentedAll code changes look good to me.
All my points have been addressed.
The IS is in order.
For me it is RTBC.
Comment #58
catchLet's remove the 'Click the links' language per https://www.drupal.org/project/drupal/issues/3250585#mr1567-note66044
Otherwise agreed this is RTBC.
Comment #59
spokjeComment #60
spokjeComment #61
longwaveThe documentation link for obsolete extensions points to https://www.drupal.org/core/TBD
Otherwise this looks ready to go.
Comment #62
spokjeSince
lifecycle: obsoletealso always comes hand in hand with alifcycle_link, we _could_ do the same as we did forlifecycle: deprecatedand make the name of the extension a link to eachlifcycle_link?Comment #63
gábor hojtsyYes, good plan! :)
Comment #64
spokjeComment #65
longwaveWe should not generate HTML manually without ensuring it is properly escaped.
Comment #66
spokjeRe-resolved all threads
Waves at guy running down the same hill following a boulder.
"Hi Sisyphus!"
Comment #67
daffie commentedTestbot is not happy.
Comment #68
spokjeTestbot needs review... #3259744: PHPUnit 9.5.12 (released 2022-01-21) throws unhandled deprecation notice on "Drupal\Tests\Listeners\DrupalListener"
Comment #69
catchLooks good to me, not sure how to trigger retesting on MRs.
Comment #70
spokjeLet's give this another TestBot round after #3259744: PHPUnit 9.5.12 (released 2022-01-21) throws unhandled deprecation notice on "Drupal\Tests\Listeners\DrupalListener" got in.
Waves at Sisyphus going up whilst chasing his own boulder downwards
Comment #71
spokjeLet's merge the fix first and _then_ start a retest
facepalms after kicking his own boulder into a ditch at the bottom of the hill.
Comment #72
spokjeGreen TestBot.
Comment #73
daffie commentedAll points have been addressed.
Back to RTBC.
Comment #76
catchCommitted/pushed to 10.0.x and cherry-picked to 9.4.x, thanks!
Comment #78
longwaveI think this is a misuse of
t()in the %module_list parameter, translating the list like that doesn't make sense. Will open a followup.Comment #79
spokjeAgreed, but it was the only way I could find to use an
implode()and get the links as HTML instead of<a href="...>text.Comment #80
catchOpened #3259996: Clean up t() usage for list of links in system_requirements().