Bugzilla – Attachment 189884 Details for
Bug 40680
Many warnings on Perl 5.40 due to importing methods from not yet defined packages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40680: Fix C4::Calendar imports
0258bb9.patch (text/plain), 4.48 KB, created by
Martin Renvoize (ashimema)
on 2025-11-21 22:13:49 UTC
(
hide
)
Description:
Bug 40680: Fix C4::Calendar imports
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-11-21 22:13:49 UTC
Size:
4.48 KB
patch
obsolete
>From 0258bb996b512a937a6470f05a3b4bd36757993c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 2 Sep 2025 12:39:36 +0200 >Subject: [PATCH] Bug 40680: Fix C4::Calendar imports > >Attempt to call undefined import method with arguments (new ...) via package C4::Calendar (Perhaps you forgot to load the package?) at t/db_dependent/Hold.t line 25. > >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > t/db_dependent/Circulation.t | 2 +- > t/db_dependent/Circulation/CalcDateDue.t | 2 +- > t/db_dependent/Hold.t | 8 +++++--- > t/db_dependent/HoldsQueue.t | 2 +- > t/db_dependent/Koha/Charges/Fees.t | 2 +- > t/db_dependent/Koha/ItemTypes.t | 2 +- > 6 files changed, 10 insertions(+), 8 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index dc0183d0241..af0a61c5324 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -34,7 +34,7 @@ use t::lib::Mocks; > use t::lib::TestBuilder; > > use C4::Accounts; >-use C4::Calendar qw( new insert_single_holiday insert_week_day_holiday delete_holiday ); >+use C4::Calendar; > use C4::Circulation > qw( AddIssue AddReturn CanBookBeRenewed GetIssuingCharges AddRenewal GetSoonestRenewDate GetLatestAutoRenewDate LostItem GetUpcomingDueIssues CanBookBeIssued AddIssuingCharge MarkIssueReturned ProcessOfflinePayment transferbook ); > use C4::Biblio; >diff --git a/t/db_dependent/Circulation/CalcDateDue.t b/t/db_dependent/Circulation/CalcDateDue.t >index 00e3c99a2ca..485b15b8181 100755 >--- a/t/db_dependent/Circulation/CalcDateDue.t >+++ b/t/db_dependent/Circulation/CalcDateDue.t >@@ -9,7 +9,7 @@ use DBI; > use DateTime; > use t::lib::Mocks; > use t::lib::TestBuilder; >-use C4::Calendar qw( new insert_single_holiday delete_holiday insert_week_day_holiday ); >+use C4::Calendar; > use Koha::DateUtils qw( dt_from_string ); > use Koha::Library::Hours; > use Koha::CirculationRules; >diff --git a/t/db_dependent/Hold.t b/t/db_dependent/Hold.t >index 281f32dc18a..61babaf78de 100755 >--- a/t/db_dependent/Hold.t >+++ b/t/db_dependent/Hold.t >@@ -22,7 +22,7 @@ use C4::Context; > use C4::Biblio qw( AddBiblio ); > use Koha::Database; > use Koha::Libraries; >-use C4::Calendar qw( new insert_single_holiday ); >+use C4::Calendar; > use Koha::Patrons; > use Koha::Holds; > use Koha::Item; >@@ -356,7 +356,8 @@ subtest "delete() tests" => sub { > "Koha::Hold->delete should have deleted the hold" > ); > >- my $number_of_logs = $schema->resultset('ActionLog') >+ my $number_of_logs = >+ $schema->resultset('ActionLog') > ->search( { module => 'HOLDS', action => 'DELETE', object => $hold->{reserve_id} } )->count; > is( $number_of_logs, 0, 'With HoldsLogs, Koha::Hold->delete shouldn\'t have been logged' ); > >@@ -376,7 +377,8 @@ subtest "delete() tests" => sub { > "Koha::Hold->delete should have deleted the hold" > ); > >- $number_of_logs = $schema->resultset('ActionLog') >+ $number_of_logs = >+ $schema->resultset('ActionLog') > ->search( { module => 'HOLDS', action => 'DELETE', object => $hold->{reserve_id} } )->count; > is( $number_of_logs, 1, 'With HoldsLogs, Koha::Hold->delete should have been logged' ); > >diff --git a/t/db_dependent/HoldsQueue.t b/t/db_dependent/HoldsQueue.t >index 0d516da3407..b4db63abfe3 100755 >--- a/t/db_dependent/HoldsQueue.t >+++ b/t/db_dependent/HoldsQueue.t >@@ -12,7 +12,7 @@ use Test::NoWarnings; > use Test::More tests => 65; > use Data::Dumper; > >-use C4::Calendar qw( new insert_single_holiday ); >+use C4::Calendar; > use C4::Context; > use C4::Members; > use C4::Circulation qw( AddIssue AddReturn ); >diff --git a/t/db_dependent/Koha/Charges/Fees.t b/t/db_dependent/Koha/Charges/Fees.t >index 9c9e3a0e05b..8d01c2a38bc 100755 >--- a/t/db_dependent/Koha/Charges/Fees.t >+++ b/t/db_dependent/Koha/Charges/Fees.t >@@ -29,7 +29,7 @@ use t::lib::TestBuilder; > use t::lib::Dates; > > use Time::Fake; >-use C4::Calendar qw( new insert_week_day_holiday delete_holiday ); >+use C4::Calendar; > use Koha::DateUtils qw(dt_from_string); > > BEGIN { >diff --git a/t/db_dependent/Koha/ItemTypes.t b/t/db_dependent/Koha/ItemTypes.t >index 383e274051d..63852bcebaa 100755 >--- a/t/db_dependent/Koha/ItemTypes.t >+++ b/t/db_dependent/Koha/ItemTypes.t >@@ -25,7 +25,7 @@ use Test::More tests => 19; > use t::lib::Mocks; > use t::lib::TestBuilder; > >-use C4::Calendar qw( new ); >+use C4::Calendar; > use Koha::Biblioitems; > use Koha::Libraries; > use Koha::Database; >-- >2.51.1 >
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 40680
:
186031
|
186032
|
186033
|
186034
|
186035
|
186036
|
186037
|
186038
|
186039
|
186040
|
186041
|
186654
|
186655
|
186656
|
186657
|
186658
|
186659
|
186660
|
186661
|
186662
|
186663
|
186664
|
187122
|
187123
|
187124
|
187125
|
187126
|
187127
|
187128
|
187129
|
187130
|
187131
|
187132
|
187385
|
187609
|
187610
|
187611
|
187612
|
187613
|
187614
|
187615
|
187616
|
187617
|
187618
|
187619
|
187815
|
187816
|
187817
|
187818
|
187819
|
187820
|
187821
|
187822
|
187823
|
187824
|
187825
|
187948
|
187949
|
187950
|
187951
|
187952
|
187953
|
187954
|
187955
|
187956
|
187957
|
187958
|
188126
|
188127
|
188128
|
188129
|
188130
|
188131
|
188132
|
188133
|
188134
|
188135
|
188136
|
189875
|
189876
|
189877
|
189878
|
189879
|
189880
|
189881
|
189882
|
189883
| 189884 |
189885