From 4df65852d90b973ce56442c768ed78f5e4f6a200 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 16 May 2026 21:44:09 +0900 Subject: feat(port): port SelfUpdateCommand.php Co-Authored-By: Claude Opus 4.7 (1M context) --- crates/shirabe-php-shim/src/lib.rs | 68 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) (limited to 'crates/shirabe-php-shim/src') diff --git a/crates/shirabe-php-shim/src/lib.rs b/crates/shirabe-php-shim/src/lib.rs index 8a5809a..5797450 100644 --- a/crates/shirabe-php-shim/src/lib.rs +++ b/crates/shirabe-php-shim/src/lib.rs @@ -272,8 +272,26 @@ impl Phar { pub fn extract_to(&self, a: &str, b: Option<()>, c: bool) { todo!() } + + pub fn running(return_full: bool) -> String { + todo!() + } } +#[derive(Debug)] +pub struct PharException { + pub message: String, + pub code: i64, +} + +impl std::fmt::Display for PharException { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.message) + } +} + +impl std::error::Error for PharException {} + #[derive(Debug)] pub struct PharFileInfo; @@ -816,6 +834,56 @@ pub fn array_diff(array1: &[String], array2: &[String]) -> Vec { todo!() } +pub fn copy(source: &str, dest: &str) -> bool { + todo!() +} + +pub fn exec(command: &str, output: Option<&mut Vec>, exit_code: Option<&mut i64>) -> Option { + todo!() +} + +pub fn tempnam(dir: &str, prefix: &str) -> Option { + todo!() +} + +pub fn openssl_verify(data: &str, signature: &[u8], pub_key_id: PhpMixed, algorithm: PhpMixed) -> i64 { + todo!() +} + +pub fn openssl_pkey_get_public(public_key: &str) -> PhpMixed { + todo!() +} + +pub fn openssl_get_md_methods() -> Vec { + todo!() +} + +pub fn openssl_free_key(key: PhpMixed) { + todo!() +} + +pub fn iterator_to_array(iter: T) -> Vec +where + T: IntoIterator, +{ + todo!() +} + +pub fn end_arr(array: &IndexMap) -> Option { + todo!() +} + +pub fn fileowner(filename: &str) -> Option { + todo!() +} + +pub fn unlink_silent(path: &str) -> bool { + todo!() +} + +pub const OPENSSL_ALGO_SHA384: i64 = 9; +pub const PHP_VERSION_ID: i64 = 80100; + pub fn array_intersect_key(array1: &IndexMap>, array2: &IndexMap>) -> IndexMap> { todo!() } -- cgit v1.3.1