diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-03 20:10:17 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-03 20:10:17 +0900 |
| commit | eacd2abcc53659a9fa20b1274a30ac4d9ad8bdb6 (patch) | |
| tree | 22affc2abef924f4f8bbe7ccec920689c9c01783 /crates/shirabe/src/package | |
| parent | 26daafaae3713cd94ce32354e6404d95e06c568c (diff) | |
| download | php-shirabe-eacd2abcc53659a9fa20b1274a30ac4d9ad8bdb6.tar.gz php-shirabe-eacd2abcc53659a9fa20b1274a30ac4d9ad8bdb6.tar.zst php-shirabe-eacd2abcc53659a9fa20b1274a30ac4d9ad8bdb6.zip | |
feat(php-shim): align fwrite/touch2/PHP_OS_FAMILY/PHP_URL_SCHEME with PHP
Adjust fwrite to return int|false equivalent (Option<i64>), 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 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/package')
| -rw-r--r-- | crates/shirabe/src/package/locker.rs | 6 |
1 files changed, 2 insertions, 4 deletions
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(()) |
