From e4402e52c08b8b28497151302c994793ce885cc3 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 21 Jun 2026 20:23:04 +0900 Subject: refactor(php-shim): drop current()/key()/end() array helpers PHP's internal array pointer (current/key/end) has no clean Rust equivalent. Remove these todo!() shim stubs and replace each call site with direct first/last element access matching Composer's original behavior. Unblocks Config::merge of anonymous {name: false} disable entries, re-enabling test_add_packagist_repository. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe-php-shim/src/array.rs | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'crates/shirabe-php-shim/src/array.rs') diff --git a/crates/shirabe-php-shim/src/array.rs b/crates/shirabe-php-shim/src/array.rs index dc06b01..e7738cc 100644 --- a/crates/shirabe-php-shim/src/array.rs +++ b/crates/shirabe-php-shim/src/array.rs @@ -701,14 +701,6 @@ pub fn count(value: &PhpMixed) -> usize { } } -pub fn current(_value: PhpMixed) -> PhpMixed { - todo!() -} - -pub fn key(_value: PhpMixed) -> Option { - todo!() -} - pub fn reset(_array: &[T]) -> Option { _array.first().cloned() } @@ -727,7 +719,3 @@ where { iter.into_iter().collect() } - -pub fn end(_array: &[V]) -> Option { - _array.last().cloned() -} -- cgit v1.3.1