https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36432
Julian Maurice <julian.maur...@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #163971|0 |1 is obsolete| | --- Comment #6 from Julian Maurice <julian.maur...@biblibre.com> --- Created attachment 163975 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163975&action=edit Bug 36432: Remove circular dependency from Koha::Object Koha::Object depends on Koha::DateUtils, which depends on C4::Context, which depends on Koha::Config::SysPref, which depends on... Koha::Object Apart from the circular dependency, the dependency on C4::Context alone is problematic as it loads a bunch of modules that are not needed at all in Koha::Object (YAML::XS and ZOOM for instance). As Koha::Object is used as a base for a lot of modules, we should take care to only load the minimum required. This patch moves some date parsing code to specific modules: - Koha::DateTime::Format::RFC3339 - Koha::DateTime::Format::SQL and it uses them in Koha::Object and Koha::DateUtils where it is possible. Test plan: 1. Do not apply the patch yet and run the following command: `perl -cw Koha/Object.pm` It should print several warnings about redefined subroutines, meaning there is a circular dependency. 2. Apply the patch 3. Run `perl -cw Koha/Object.pm`. It should only say: "Koha/Object.pm syntax OK" 4. Run the following command: prove \ t/DateUtils.t \ t/Koha/DateTime/Format/RFC3339.t \ t/db_dependent/Koha/Object.t -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/