From 0209f63210e5b547b5c6b73367bb80ea86c255ec Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 8 Aug 2026 03:52:33 +0900 Subject: feat(composer): bake the dev build warning deadline in at build time Composer defines COMPOSER_DEV_WARNING_TIME from its phar stub when the compiled version is a commit hash rather than a tag, so the value exists only in the build artifact. It was a todo!() in the PHP shim, leaving the warning branch in Application::do_run unreachable. A build script now derives it the way Compiler does, from git describe and the HEAD commit date, and composer::COMPOSER_DEV_WARNING_TIME holds the result as a Rust constant instead of a runtime-defined one. Co-Authored-By: Claude Opus 5 (1M context) --- crates/shirabe-php-shim/src/runtime.rs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'crates/shirabe-php-shim/src') diff --git a/crates/shirabe-php-shim/src/runtime.rs b/crates/shirabe-php-shim/src/runtime.rs index 591c7260..05396b3b 100644 --- a/crates/shirabe-php-shim/src/runtime.rs +++ b/crates/shirabe-php-shim/src/runtime.rs @@ -455,12 +455,6 @@ pub fn ini_set(_varname: &str, _value: &str) -> Option { todo!() } -pub fn composer_dev_warning_time() -> i64 { - // TODO(phase-c): COMPOSER_DEV_WARNING_TIME is a build-time constant baked into Composer's release - // artifact; it has no fixed value in source and must be provided by the build process. - todo!() -} - pub fn gc_collect_cycles() -> i64 { // Rust has no cycle collector; nothing is collected. 0 -- cgit v1.3.1-4-g156e