From 8b9368a3d2c8cb5b73edc794b77ebd2460d24b06 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 20 Jul 2026 06:28:13 +0900 Subject: fix(config): restore PHP (int) cast for ttl and timeout values PHP's Config::get() applies an (int) cast to cache-files-ttl, cache-ttl, and the process-timeout env override (Config.php:326,367,398), so string values like '99999999' become integers. The strict PhpMixed::as_int returned None for strings, collapsing them to 0. Use the intval shim, which implements the PHP cast, and un-ignore test_cache_garbage_collection_is_called which this had blocked. Co-Authored-By: Claude Fable 5 --- crates/shirabe/tests/downloader/file_downloader_test.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'crates/shirabe/tests') diff --git a/crates/shirabe/tests/downloader/file_downloader_test.rs b/crates/shirabe/tests/downloader/file_downloader_test.rs index 451b792e..623ac34c 100644 --- a/crates/shirabe/tests/downloader/file_downloader_test.rs +++ b/crates/shirabe/tests/downloader/file_downloader_test.rs @@ -196,7 +196,6 @@ fn test_download_with_custom_cache_key() { #[test] #[serial] -#[ignore = "PHP Config::get('cache-files-ttl') casts the string via (int) (Config.php:396-398), turning '99999999' into 99999999, but shirabe's PhpMixed::as_int returns None for String so Config::get yields 0 and the assertion fails. Faithful port stays failing until the src is fixed."] fn test_cache_garbage_collection_is_called() { let expected_ttl: i64 = 99999999; -- cgit v1.3.1