Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
update.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Mar 2026 at 03:27 UTC
Updated:
14 Sep 2026 at 09:20 UTC
Jump to comment: Most recent
Comments
Comment #2
nicxvan commentedComment #4
nicxvan commentedComment #5
nicxvan commentedComment #6
dwwx-posting this:
Maybe we need a "Modernize Update Status" meta or something. 😅 Or turn this issue into that.
Super briefly, take a look at
core/modules/update/src/UpdateProcessorInterface.php" * Processor of project update information."
And yet, nearly all the methods in there are really about fetching data. The only "processing" that happens is parsing the XML into a giant PHP array and putting it into the 'update_available_releases' key/value temp store.
Meanwhile, I wonder if instead of a new "UpdateStorageClear" service, should whatever service does/should populate those key/value storages have a method to clear them out?
Comment #8
nicxvan commentedComment #9
nicxvan commentedThis is ready for review.
I ended up organizing it slightly differently, I think this actually ended up in a pretty nice place.
One weird thing is I noticed some places were using
update_available_releaseinstead ofupdate_available_releases.I fixed that in the two places necessary.
This is green and I think it's actually good step towards cleaning up update!
Comment #10
nicxvan commentedAdded suggestions for 11.5 deprecation since this almost certainly won't make it into 11.4
Comment #11
nicxvan commentedI addressed most of the feedback, but a bunch of tests broke, gotta track it down.Wrong issue.
Comment #12
nicxvan commentedComment #14
smustgrave commentedSo MR didn't apply cleanly with a little fuzziness
error: patch failed: core/modules/package_manager/tests/src/Kernel/ProjectInfoTest.php:191
error: core/modules/package_manager/tests/src/Kernel/ProjectInfoTest.php: patch does not apply
So rebased
Searched for _update_no_data = all instances are gone (1 entry in phpstan just noting)
update_get_available = all instances replaced
update_create_fetch_task = all instances replaced
update_refresh = all instances replaced
update_fetch_data = all instances replaced
update_fetch_data_finished = all instances replaced
_update_message_text = all instances replaced
_update_project_status_sort = all instances replaced (1 entry in phpstan just noting)
update_storage_clear = all instances replaced
All threads appear to be addressed. Going to mark.
Comment #16
quietone commentedI sorted the list of procedural functions, the replacements are now in a table. For the change record and deprecation text in the MR all references to the replacements are as its fully qualified name.
Comment #17
nicxvan commentedI realized the batch callback was static so I converted it here: https://git.drupalcode.org/project/drupal/-/merge_requests/15943/diffs?c...
It was just replacing:
\Drupal::messenger() with $this->messenger()
\Drupal::translation()->formatPlural with $this->formatPlural
t( with $this->t
Since it's a controller and it already has the messenger and string translation traits.
Could use a +1, but not sure it's worth bumping out of RTBC.
Comment #18
berdirThe diff looks OK to me but I'm more concerned about the operation there, that stores an instance of the updateManager object in the batch daata. For that one it's actually important to be called as a service.
Comment #19
nicxvan commentedYes, good catch, I should have looked up a few lines.
This should be ready again, thanks!
Comment #20
berdirReviewed. A few comments for context for future reviewers and a few minor suggestions on docs, return types and how the services are accessed.
Comment #21
nicxvan commentedI addressed all comments. I had to revert the null default for a follow up.
Comment #22
berdirMy feedback has been addressed, this was RTBC before.
Comment #25
catchCommitted/pushed to main and 11.x, thanks!
With the package_manager code, there's still an open issue whether to use update status or not for that in #3408901: [policy, no patch] Decide if and when automatic updates should rely only on packagist data to determine installability of modules.