Preliminary note: I'm creating the issue so that the task doesn't get lost, but I most probably won't have time to tackle this myself :-(
After #394268: DIE update_sql() DIE!,
- hook_update_N() should not return an array anymore, just (if needed) a string message that will be displayed to the user on the results page.
- multipass updates should alter $context['#finished'] instead or returning $ret['#finished']
Task:
- agree on a 'standard' for when to return a user-facing message and when to just update silently ?
- move all existing core updates to the new format (might be worth waiting that the $ret parameter is removed from db_* functions - not sure if there's an issue for that already).
- remove the backward-compatibility layer in update_do_one() and update_results_page(), and streamline the code for the new, simplified result format. No more query or $query['query']...
Comments
Comment #1
yched commentedAlso: document the change on the module upgrade guide.
Comment #2
Crell commented#570900: Destroy remnants of update_sql() was just committed, so all that should be left here is to improve the documentation on update hooks since right now they'll pretty much all return no messages whatsoever. :-) I defer to others to decide if and what to return from the ones in core.
Oh yes, and removing the BC layer in update_do_one(). That should be easy, as the bits to remove are already marked, but there may be other cleanup possible in there as well.
Comment #3
sun.core commentedIs this really critical? I don't think so.