From fcc9299605e8d0be5aae91f9619cc0d69e45d7c5 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 29 Aug 2025 18:03:39 -0300 Subject: [PATCH] Bug 39190: Fix circular dependency causing C3 MRO failures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolved circular dependency chain: Transport.pm → TestTransport.pm → Transports.pm → SFTP.pm → Transport.pm Changed 'use Koha::BackgroundJob::TestTransport' to runtime 'require' in the _post_store_trigger method to break the dependency cycle. This fixes the C3 method resolution order failures in Koha::File::Transport::FTP and Koha::File::Transport::SFTP. --- Koha/File/Transport.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/File/Transport.pm b/Koha/File/Transport.pm index dc4d1cf75ea..47ba6eea853 100644 --- a/Koha/File/Transport.pm +++ b/Koha/File/Transport.pm @@ -25,7 +25,6 @@ use constant { use JSON qw( decode_json encode_json ); use List::MoreUtils qw( any ); -use Koha::BackgroundJob::TestTransport; use Koha::Database; use Koha::Exceptions::Object; use Koha::Encryption; @@ -80,6 +79,7 @@ sub store { # Enqueue a connection test if ($changed_config) { + require Koha::BackgroundJob::TestTransport; Koha::BackgroundJob::TestTransport->new->enqueue( { transport_id => $self->id } ); } -- 2.51.0