[Bug 40983] New: Remove deprecated syntax for 'after_biblio_action' hooks
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40983 Bug ID: 40983 Summary: Remove deprecated syntax for 'after_biblio_action' hooks Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Plugin architecture Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org Depends on: 36343 Following the work on bug 36343, which aimed to improve the consistency of our plugin hook signatures, we introduced a new syntax for the after_biblio_action hooks that includes a payload parameter. To ensure backward compatibility, the older signature was maintained but marked as deprecated, with warnings logged when it is used. The purpose of this bug is to complete the deprecation cycle by removing the code that handles the older style syntax and the associated deprecation warnings. This will involve: Removing the compatibility code that checks for and handles the old hook signature (without the payload key). Removing the Koha::Logger warnings that are triggered when the old signature is detected. Updating any relevant documentation to reflect that only the new signature is supported. This will help to clean up the codebase, reduce complexity, and ensure that all plugins are using the modern, consistent hook signature. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36343 [Bug 36343] The 'after_biblio_action' hooks have an inconsistent signature compared to before_biblio_action, and actions in reserves and items -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40983 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40983 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40983 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 187652 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187652&action=edit Bug 40983: Complete deprecation of old after_biblio_action hook signature This patch completes the deprecation cycle started in bug 36343 by removing the backward compatibility code and deprecation warnings for the old after_biblio_action hook signature. Changes made: 1. Removed the duplicate biblio and biblio_id parameters from _after_biblio_action_hooks in C4::Biblio that were marked for deprecation in 24.11.00 2. Updated the test plugin to use only the new payload-based signature, ensuring all parameters are accessed via $params->{payload} The after_biblio_action hook now consistently uses the modern signature with a payload parameter, matching the pattern used by other plugin hooks like before_biblio_action, after_item_action, and after_hold_action. Test plan: 1. Run: prove t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t 2. Run: prove t/db_dependent/Koha/Plugins/ 3. Run: prove t/db_dependent/Biblio.t 4. All tests should pass -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40983 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40983 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |minor -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40983 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl, | |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40983 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |IMPORTANT: The former release notes| |biblio and biblio_id params | |of after_biblio_action | |hooks/plugins have been | |removed now. They were | |deprecated on bug 36343 and | |replaced by the payload | |hash. Please adjust your | |plugins using them, if you | |did not do so already. QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40983 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40983 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187652|0 |1 is obsolete| | --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 187715 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187715&action=edit Bug 40983: Complete deprecation of old after_biblio_action hook signature This patch completes the deprecation cycle started in bug 36343 by removing the backward compatibility code and deprecation warnings for the old after_biblio_action hook signature. Changes made: 1. Removed the duplicate biblio and biblio_id parameters from _after_biblio_action_hooks in C4::Biblio that were marked for deprecation in 24.11.00 2. Updated the test plugin to use only the new payload-based signature, ensuring all parameters are accessed via $params->{payload} The after_biblio_action hook now consistently uses the modern signature with a payload parameter, matching the pattern used by other plugin hooks like before_biblio_action, after_item_action, and after_hold_action. Test plan: 1. Run: prove t/db_dependent/Koha/Plugins/Biblio_and_Items_plugin_hooks.t 2. Run: prove t/db_dependent/Koha/Plugins/ 3. Run: prove t/db_dependent/Biblio.t 4. All tests should pass Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40983 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 187716 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187716&action=edit Bug 40983: (QA follow-up) Add a (final) upgrade warn Just a last wake up call. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40983 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Trivial patch. SO and QA in one pass. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40983 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40983 --- Comment #5 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40983 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.11.00 |25.11.00,25.05.06 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40983 --- Comment #6 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40983 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to stable |Needs documenting --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- I prefer not backport to 24.11.x since it is a LTS -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40983 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED CC| |david@davidnind.com Resolution|--- |FIXED --- Comment #8 from David Nind <david@davidnind.com> --- Plugin development related, no changes to the manual required. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org