From 435475af8ea0cfd90b91f64bb668cf399ed82f2f Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 2 Aug 2026 17:09:59 +0900 Subject: chore(php-shim): drop the unused Phar APIs left as todo!() Phar::running has its only Composer call site in SelfUpdateCommand, and self-update will not go through a phar in Shirabe. The .phar writing API (and the SHA512 constant it takes) is only used by Composer's Compiler, which packages composer.phar and has no counterpart in a native binary. Co-Authored-By: Claude Opus 5 (1M context) --- crates/shirabe-php-shim/src/phar.rs | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/crates/shirabe-php-shim/src/phar.rs b/crates/shirabe-php-shim/src/phar.rs index 50961bde..6e4270ac 100644 --- a/crates/shirabe-php-shim/src/phar.rs +++ b/crates/shirabe-php-shim/src/phar.rs @@ -424,43 +424,6 @@ impl Phar { ) -> anyhow::Result<()> { extract_entries(&self.path, &self.entries, directory, overwrite) } - - pub fn running(_return_full: bool) -> String { - // TODO(phase-c): reports the phar the current script runs from; Shirabe is a native - // binary and nothing in the ported code calls this yet. - todo!() - } -} - -impl Phar { - pub const SHA512: i64 = 16; - - // TODO(phase-c): the native .phar writing API below has no call sites in the ported code - // (Composer's Compiler is not ported); it is deliberately deferred. - - pub fn new_phar(_filename: String, _flags: i64, _alias: &str) -> Self { - todo!() - } - - pub fn set_signature_algorithm(&mut self, _algo: i64) { - todo!() - } - - pub fn start_buffering(&mut self) { - todo!() - } - - pub fn stop_buffering(&mut self) { - todo!() - } - - pub fn add_from_string(&mut self, _path: &str, _content: &str) { - todo!() - } - - pub fn set_stub(&mut self, _stub: &str) { - todo!() - } } #[derive(Debug)] -- cgit v1.3.1