From 99ef82a9807578c1e5749156a027949efaba75c4 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 22 Jun 2026 23:40:47 +0900 Subject: feat(json): resolve bundled Composer schema files via build.rs JsonFile's schema paths previously relied on php_dir() (__DIR__), which has no runtime equivalent. Add a build.rs that copies composer-schema.json and composer-lock-schema.json next to the built executable, and resolve them with std::env::current_exe(). FilesystemRepository now embeds InstalledVersions.php directly via include_str! instead of reading it through php_dir(). Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe-php-shim/src/fs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/shirabe-php-shim') diff --git a/crates/shirabe-php-shim/src/fs.rs b/crates/shirabe-php-shim/src/fs.rs index a97433a..e55b689 100644 --- a/crates/shirabe-php-shim/src/fs.rs +++ b/crates/shirabe-php-shim/src/fs.rs @@ -512,8 +512,8 @@ pub fn file_put_contents3(_filename: &str, _data: &str, _flags: i64) -> Option Option { - std::fs::read(_path) +pub fn file_get_contents(path: impl AsRef) -> Option { + std::fs::read(path) .ok() .map(|bytes| String::from_utf8_lossy(&bytes).into_owned()) } -- cgit v1.3.1