Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
update.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
29 Jan 2025 at 02:18 UTC
Updated:
27 Mar 2025 at 16:34 UTC
Jump to comment: Most recent
Comments
Comment #2
andypostComment #3
andypost@dww can you move existing MR here https://git.drupalcode.org/project/drupal/-/merge_requests/10461
Comment #4
dww@andypost: Not sure what you're requesting in #3. That MR is for a set of changes to completely remove all this code. Instead, it'll probably be more simple to start over from scratch here, since there's now a different scope and approach needed for this issue.
But if I'm misunderstanding, please let me know.
Thanks!
-Derek
Comment #6
dwwOpened a CR for this (to get a valid NID for deprecation messages) and started deprecating everything in the IS. Pushed commits for
authorize.phpandsystem_authorized_*(). Opened an MR. Still incomplete, so NW, but wanted to at least get this started and to see if the bot explodes in any unexpected ways. 😅Comment #7
dwwI asked in #core-development in Slack, but x-posting here:
core/modules/system/tests/src/Functional/System/SystemAuthorizeTest.phpis now failing since it's triggering deprecations. Can I completely remove that test as part of this issue, or do I need to convert it to expect deprecations, etc?Comment #8
catchI think @group legacy will allow the test to pass with deprecations without changing anything else about it. We have to use that on update test for similar reasons.
Comment #9
andypostMaybe deprecation of hooks could be done in module handler? gonna dig it
Comment #10
dww@andypost, see:
https://www.drupal.org/about/core/policies/core-change-policies/how-to-d...
I’m assigning myself, since I’ve got more of this done locally. Stay tuned.
Comment #11
dwwOkay, cool, that's working now.
Adding a TODO list under remaining tasks, and crossing out what's already been pushed...
Comment #12
dww@andypost: Argh, what are you doing? I assigned this to myself and am actively working on it.
Comment #13
dwwAdded an item to API changes for:
core/modules/update/update.authorize.incUpdating remaining tasks to cross off what's done. Almost there...
Comment #14
dwwComment #15
dwwAdded another API change point for:
core/modules/update/update.manager.incEverything is now done. Pipeline is green. Simplified remaining tasks.
This is now ready for review (both the MR and the CR). Unassigning.
Thanks!
-Derek
Comment #16
andypostI'd like to set RTBC but probably exception classes needs constructor to throw deprecation...
but they are inherited so both will throw
Comment #17
dwwRe:
From @catch via Slack:
https://drupal.slack.com/archives/C079NQPQUEN/p1741811869453559?thread_t...
catch: I don't think we have anything explicit for deprecating exceptions, but given these aren't used anywhere outside the system we're deprecating I think just @trigger_error() is fine.
dww: But then I have to add
__construct()methods. 😅 Can I just do the annotation, instead?catch: Sorry that's what I meant...
Comment #18
andypostChecked usage in contrib and it could be found in DB-mocks of D7 http://codcontrib.hank.vps-private.net/search?text=UpdaterFileTransferEx...
RTBC as both code and CR looks ready
Comment #19
dwwHuzzah, thanks!
Comment #21
catchGiven zero actual usages of those exceptions I think it's fine to add just the annotation. Everything else looks good. Ideally phpstan would ignore deprecated usages inside deprecated code but either it doesn't or it's not perfect.
Committed/pushed to 11.x, thanks!
Comment #23
dwwYay, thanks! I published the CR