Bugzilla – Attachment 161692 Details for
Bug 35959
Inconsistent hierarchy during C3 merge of class 'Koha::AuthorisedValue' (and a few other modules)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35959: Resolve Inconsistent hierarchy-warn from 4 modules
Bug-35959-Resolve-Inconsistent-hierarchy-warn-from.patch (text/plain), 3.74 KB, created by
Marcel de Rooy
on 2024-01-31 14:54:34 UTC
(
hide
)
Description:
Bug 35959: Resolve Inconsistent hierarchy-warn from 4 modules
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-01-31 14:54:34 UTC
Size:
3.74 KB
patch
obsolete
>From 6bac7a95d268ec2f059d12a0bb7c21ace169ae60 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 31 Jan 2024 13:49:12 +0000 >Subject: [PATCH] Bug 35959: Resolve Inconsistent hierarchy-warn from 4 modules >Content-Type: text/plain; charset=utf-8 > >Inspired by https://www.perlmonks.org/?node_id=1151073 >Clearing @ISA did not work, but pushing the relations seems to. > >Test plan: >Run qa tools (to see results of perl -cw). (Ignore warning when processing files before patches.) >Run some tests that use those modules. >Touch a few pages referencing those modules. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Tested: >prove t/db_dependent/Accounts.t t/db_dependent/Koha/Account/DebitType.t >prove t/db_dependent/AuthorisedValues.t t/db_dependent/Koha.t t/db_dependent/Koha/Object.t >prove t/db_dependent/Koha/Patron.t t/db_dependent/Koha/Patron/Attribute.t t/db_dependent/Koha/Patron/Attribute/Types.t >prove t/db_dependent/Koha/Objects.t t/db_dependent/Koha/Patron/Categories.t > >admin/debit_types.pl >admin/authorised_values.pl >admin/patron-attr-types.pl >admin/categories.pl >--- > Koha/Account/DebitType.pm | 5 ++++- > Koha/AuthorisedValue.pm | 5 ++++- > Koha/Patron/Attribute/Type.pm | 6 +++++- > Koha/Patron/Category.pm | 7 ++++--- > 4 files changed, 17 insertions(+), 6 deletions(-) > >diff --git a/Koha/Account/DebitType.pm b/Koha/Account/DebitType.pm >index 1d5f7f1418..8cc2645566 100644 >--- a/Koha/Account/DebitType.pm >+++ b/Koha/Account/DebitType.pm >@@ -19,10 +19,13 @@ package Koha::Account::DebitType; > > use Modern::Perl; > >+use Koha::Object; >+use Koha::Object::Limit::Library; > use Koha::Database; > use Koha::Exceptions; > >-use base qw(Koha::Object Koha::Object::Limit::Library); >+# Bug 35959 - Avoid Inconsistent hierarchy warn by replacing use base line >+push @Koha::Account::DebitType::ISA, qw(Koha::Object Koha::Object::Limit::Library); > > =head1 NAME > >diff --git a/Koha/AuthorisedValue.pm b/Koha/AuthorisedValue.pm >index da25d5e058..e756b1abc1 100644 >--- a/Koha/AuthorisedValue.pm >+++ b/Koha/AuthorisedValue.pm >@@ -21,8 +21,11 @@ use Modern::Perl; > > use Koha::Caches; > use Koha::Database; >+use Koha::Object; >+use Koha::Object::Limit::Library; > >-use base qw(Koha::Object Koha::Object::Limit::Library); >+# Bug 35959 - Avoid Inconsistent hierarchy warn by replacing use base line >+push @Koha::AuthorisedValue::ISA, qw(Koha::Object Koha::Object::Limit::Library); > > my $cache = Koha::Caches->get_instance(); > >diff --git a/Koha/Patron/Attribute/Type.pm b/Koha/Patron/Attribute/Type.pm >index 772cad3c43..88166d927a 100644 >--- a/Koha/Patron/Attribute/Type.pm >+++ b/Koha/Patron/Attribute/Type.pm >@@ -17,10 +17,14 @@ package Koha::Patron::Attribute::Type; > > use Modern::Perl; > >+use Koha::Object; >+use Koha::Object::Limit::Library; >+ > use Koha::Database; > use Koha::Exceptions::Patron::Attribute::Type; > >-use base qw(Koha::Object Koha::Object::Limit::Library); >+# Bug 35959 - Avoid Inconsistent hierarchy warn by replacing use base line >+push @Koha::Patron::Attribute::Type::ISA, qw(Koha::Object Koha::Object::Limit::Library); > > =head1 NAME > >diff --git a/Koha/Patron/Category.pm b/Koha/Patron/Category.pm >index e24c8d6e79..edc86d1881 100644 >--- a/Koha/Patron/Category.pm >+++ b/Koha/Patron/Category.pm >@@ -16,15 +16,16 @@ package Koha::Patron::Category; > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >- > use List::MoreUtils qw( any ); > >+use Koha::Object; >+use Koha::Object::Limit::Library; > use C4::Members::Messaging; >- > use Koha::Database; > use Koha::DateUtils qw( dt_from_string ); > >-use base qw(Koha::Object Koha::Object::Limit::Library); >+# Bug 35959 - Avoid Inconsistent hierarchy warn by replacing use base line >+push @Koha::Patron::Category::ISA, qw(Koha::Object Koha::Object::Limit::Library); > > =head1 NAME > >-- >2.30.2
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 35959
:
161690
|
161692
|
161693
|
162410
|
162411
|
162481
|
162482
|
162483
|
164468
|
164469
|
164470
|
164471
|
166926
|
166927
|
166928
|
166929
|
168427
|
168441
|
168442
|
168443
|
168444
|
168445
|
168566