aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-php-shim
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-25 16:44:29 +0900
committernsfisis <nsfisis@gmail.com>2026-06-26 00:20:05 +0900
commitf5f429dbae0a3e2d8224c0b1e4edcef54805d286 (patch)
tree9f837baeeae6efa0ed926b181b8c273128d86c49 /crates/shirabe-php-shim
parent3a0d9340810a8808d963135a884f50d08442ac67 (diff)
downloadphp-shirabe-f5f429dbae0a3e2d8224c0b1e4edcef54805d286.tar.gz
php-shirabe-f5f429dbae0a3e2d8224c0b1e4edcef54805d286.tar.zst
php-shirabe-f5f429dbae0a3e2d8224c0b1e4edcef54805d286.zip
feat(http): reimplement CurlDownloader on reqwest; port 15 more tests
Replace the libcurl-shim CurlDownloader with a reqwest+tokio implementation per the .ken sketch, resolving the construction panic that blocked command tests (mock path via __new_mock is untouched). Port remote_filesystem (7), hg/svn driver (4), zip_archiver/git_exclude_filter (4) tests. Fix hg/svn/git_exclude regex-delimiter and svn result-propagation porting bugs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-php-shim')
-rw-r--r--crates/shirabe-php-shim/src/runtime.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/shirabe-php-shim/src/runtime.rs b/crates/shirabe-php-shim/src/runtime.rs
index 73a4189..d051f3d 100644
--- a/crates/shirabe-php-shim/src/runtime.rs
+++ b/crates/shirabe-php-shim/src/runtime.rs
@@ -76,9 +76,14 @@ pub fn defined(name: &str) -> bool {
// `Composer\Autoload\ClassLoader` (and its `getRegisteredLoaders`) is absent from the running
// process; the class-name form therefore reports no such method. The object form needs runtime
// reflection that PhpMixed::Object does not carry.
-pub fn method_exists(object_or_class: &PhpMixed, _method_name: &str) -> bool {
+pub fn method_exists(object_or_class: &PhpMixed, method_name: &str) -> bool {
match object_or_class {
PhpMixed::String(_) => false,
+ // `ZipArchiver::archive` guards `$zip->setExternalAttributesName(...)` with
+ // `method_exists($zip, 'setExternalAttributesName')` (only available with libzip >= 0.11.2).
+ // The `zip`-crate-backed shim cannot amend an already-written entry's external attributes,
+ // so the method is deliberately absent here and the guard reports it missing.
+ PhpMixed::Null if method_name == "setExternalAttributesName" => false,
_ => todo!(),
}
}