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-php-shim/src/var.rs | 9 --------- 1 file changed, 9 deletions(-) (limited to 'crates/shirabe-php-shim') diff --git a/crates/shirabe-php-shim/src/var.rs b/crates/shirabe-php-shim/src/var.rs index 257dd8bd..4b0ed2f5 100644 --- a/crates/shirabe-php-shim/src/var.rs +++ b/crates/shirabe-php-shim/src/var.rs @@ -230,15 +230,6 @@ pub fn get_class_err(_e: &anyhow::Error) -> String { todo!() } -/// Overload accepting any object reference. PHP's `get_class($obj)` returns the -/// class name; in Rust we don't have a runtime class name, so this stub is left -/// as `todo!()`. -pub fn get_class_obj(_object: &T) -> String { - // TODO(php-runtime): PHP returns the object's class name; Rust has no runtime class name for an - // arbitrary `T` (the static type path is not the PHP class name). - todo!() -} - pub fn get_debug_type(value: &PhpMixed) -> String { match value { PhpMixed::Null => "null".to_string(), -- cgit v1.3.1