From eacd2abcc53659a9fa20b1274a30ac4d9ad8bdb6 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 3 Jun 2026 20:10:17 +0900 Subject: feat(php-shim): align fwrite/touch2/PHP_OS_FAMILY/PHP_URL_SCHEME with PHP Adjust fwrite to return int|false equivalent (Option), add touch2 with mtime, implement PHP_OS_FAMILY via std::env::consts::OS, and swap the PHP_URL_HOST placeholders for the now-available PHP_URL_SCHEME. Wire these into locker, filesystem, platform, and remote_filesystem. Co-Authored-By: Claude Opus 4.8 --- crates/shirabe/src/package/locker.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'crates/shirabe/src/package') diff --git a/crates/shirabe/src/package/locker.rs b/crates/shirabe/src/package/locker.rs index 9e36255..3b5db05 100644 --- a/crates/shirabe/src/package/locker.rs +++ b/crates/shirabe/src/package/locker.rs @@ -8,7 +8,7 @@ use shirabe_external_packages::seld::json_lint::ParsingException; use shirabe_php_shim::{ DATE_RFC3339, LogicException, PhpMixed, RuntimeException, array_intersect, array_keys, array_map, array_merge, call_user_func, file_get_contents, filemtime, function_exists, hash, - in_array, is_array, is_int, ksort, realpath, reset_first, sprintf, strcmp, strtolower, touch, + in_array, is_array, is_int, ksort, realpath, reset_first, sprintf, strcmp, strtolower, touch2, trim, usort, }; @@ -709,9 +709,7 @@ impl Locker { self.virtual_file_written = false; if let Some(mtime) = lock_mtime { if is_int(&PhpMixed::Int(mtime)) { - // TODO(phase-b): touch() in php-shim doesn't accept mtime; need touch2 - let _ = mtime; - let _ = touch(&self.lock_file.get_path()); + let _ = touch2(&self.lock_file.get_path(), mtime); } } Ok(()) -- cgit v1.3.1