From 340164c64e90d44b1bdf620b514166db1f76cc98 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 24 Jun 2026 00:47:20 +0900 Subject: test: port more unimplemented tests Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/installed_versions.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'crates/shirabe/src/installed_versions.rs') diff --git a/crates/shirabe/src/installed_versions.rs b/crates/shirabe/src/installed_versions.rs index c4ef526..33286ad 100644 --- a/crates/shirabe/src/installed_versions.rs +++ b/crates/shirabe/src/installed_versions.rs @@ -352,6 +352,20 @@ impl InstalledVersions { /// Returns the raw data of all installed.php which are currently loaded for custom implementations /// /// @return array[] + /// Returns the first dataset loaded, which may not be what you expect. Use get_all_raw_data + /// instead, which returns all datasets for all autoloaders present in the process. + pub fn get_raw_data() -> IndexMap { + // PHP emits an E_USER_DEPRECATED notice here; there is no Rust equivalent. + let mut installed = INSTALLED.lock().unwrap(); + if installed.is_none() { + // PHP only includes __DIR__/installed.php when loaded from its dumped location; the + // shim is always the source location (PHP's `else` branch), so the data is empty. + *installed = Some(IndexMap::new()); + } + + installed.clone().unwrap() + } + pub fn get_all_raw_data() -> Vec> { Self::get_installed() } -- cgit v1.3.1