Bugzilla – Attachment 187652 Details for
Bug 40983
Remove deprecated syntax for 'after_biblio_action' hooks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40983: Complete deprecation of old after_biblio_action hook signature
Bug-40983-Complete-deprecation-of-old-afterbiblioa.patch (text/plain), 2.39 KB, created by
Martin Renvoize (ashimema)
on 2025-10-09 12:03:12 UTC
(
hide
)
Description:
Bug 40983: Complete deprecation of old after_biblio_action hook signature
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-10-09 12:03:12 UTC
Size:
2.39 KB
patch
obsolete
>From c2d276646b5eb371895084ca0ff493021cd25447 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Thu, 9 Oct 2025 13:02:22 +0100 >Subject: [PATCH] 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 >--- > C4/Biblio.pm | 4 ---- > t/lib/plugins/Koha/Plugin/Test.pm | 5 +++-- > 2 files changed, 3 insertions(+), 6 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index c56d721003c..a6e1230d92a 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -3203,10 +3203,6 @@ sub _after_biblio_action_hooks { > biblio => $biblio, > biblio_id => $biblio_id, > }, >- >- # NOTE: Deprecate these duplicate params for 24.11.00 >- biblio => $biblio, >- biblio_id => $biblio_id, > } > ); > } >diff --git a/t/lib/plugins/Koha/Plugin/Test.pm b/t/lib/plugins/Koha/Plugin/Test.pm >index 46f0732dc6a..4d6bd517f69 100644 >--- a/t/lib/plugins/Koha/Plugin/Test.pm >+++ b/t/lib/plugins/Koha/Plugin/Test.pm >@@ -187,8 +187,9 @@ sub before_biblio_action { > sub after_biblio_action { > my ( $self, $params ) = @_; > my $action = $params->{action} // ''; >- my $biblio = $params->{biblio}; >- my $biblio_id = $params->{biblio_id}; >+ my $payload = $params->{payload}; >+ my $biblio = $payload->{biblio}; >+ my $biblio_id = $payload->{biblio_id}; > > if ( $action ne 'delete' ) { > Koha::Exception->throw( "after_biblio_action called with action: $action, ref: " . ref($biblio) ); >-- >2.51.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40983
:
187652
|
187715
|
187716