From 9411867aa23f8f4f3a6b21b4e8ca9f498a16283a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 6 Aug 2026 20:38:00 +0900 Subject: fix(download-manager): name the downloader class in its LogicException MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit getDownloaderForPackage reports get_class($downloader) when the resolved downloader's installation source does not match. Rust has no runtime class name, so the message was built from a shim stub that panicked instead — the error could never be returned. DownloaderInterface now requires PhpClass, the trait already used for the same purpose on Command, and each downloader states the name PHP reports. That leaves get_class_obj without callers, so it is gone. Co-Authored-By: Claude Opus 5 (1M context) --- crates/shirabe/src/downloader/fossil_downloader.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crates/shirabe/src/downloader/fossil_downloader.rs') diff --git a/crates/shirabe/src/downloader/fossil_downloader.rs b/crates/shirabe/src/downloader/fossil_downloader.rs index 2f6df9a4..c6be8f24 100644 --- a/crates/shirabe/src/downloader/fossil_downloader.rs +++ b/crates/shirabe/src/downloader/fossil_downloader.rs @@ -15,6 +15,8 @@ use indexmap::IndexMap; use shirabe_external_packages::composer::pcre::Preg; use shirabe_php_shim::{PhpMixed, RuntimeException, php_regex}; +shirabe_php_shim::impl_php_class!(FossilDownloader, r"Composer\Downloader\FossilDownloader"); + #[derive(Debug)] pub struct FossilDownloader { inner: VcsDownloaderBase, -- cgit v1.3.1