aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/repository/platform_repository_test.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-06 20:38:19 +0900
committernsfisis <nsfisis@gmail.com>2026-08-06 20:38:19 +0900
commit91e7102d02cfcda0bf1b82ae1b3fb30900495360 (patch)
tree36be9051ad3a0a12c72ec4ab2afb2359b8983c65 /crates/shirabe/tests/repository/platform_repository_test.rs
parenta7bd624b3e9d4e9493435be1e6016303830e7087 (diff)
downloadphp-shirabe-91e7102d02cfcda0bf1b82ae1b3fb30900495360.tar.gz
php-shirabe-91e7102d02cfcda0bf1b82ae1b3fb30900495360.tar.zst
php-shirabe-91e7102d02cfcda0bf1b82ae1b3fb30900495360.zip
fix(platform-repository): report the icu and imagick libraries
PlatformRepository probes ResourceBundle, IntlChar and Imagick to derive lib-icu-cldr, lib-icu-unicode and lib-imagick-imagemagick. Those probes ran against the shim's hard-coded class_exists allowlist, which never names them, so the packages were silently missing: on a machine with intl, `show --platform` listed fewer libraries than upstream Composer does. The runtime seam now asks the real PHP: hasClass over RPC, and construct / invoke through the worker for the three classes PlatformRepository reaches. A live PHP object has no PhpMixed counterpart, so the seam answers with the entries the caller reads off it. The seam's own callers read those entries instead of returning null and the empty string. Two addLibrary calls also had replaces and provides swapped, dropping `lib-libxslt replaces lib-xsl` and `lib-zip-libzip replaces lib-zip`. `show --platform` now matches upstream Composer byte for byte, and all 59 provideLibraryTestCases datasets pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/repository/platform_repository_test.rs')
-rw-r--r--crates/shirabe/tests/repository/platform_repository_test.rs9
1 files changed, 0 insertions, 9 deletions
diff --git a/crates/shirabe/tests/repository/platform_repository_test.rs b/crates/shirabe/tests/repository/platform_repository_test.rs
index 507938a0..3a4bf45d 100644
--- a/crates/shirabe/tests/repository/platform_repository_test.rs
+++ b/crates/shirabe/tests/repository/platform_repository_test.rs
@@ -1612,16 +1612,7 @@ fn assert_package_links(
}
}
-// TODO(phase-d): blocked by the TODO(plugin) stubs below; re-check once the plugin RPC
-// mechanism can dispatch method calls on PHP objects.
#[test]
-#[ignore = "all 59 provideLibraryTestCases datasets ported faithfully; blocked by two \
- TODO(plugin) stubs in PlatformRepository that need dynamic method dispatch on \
- PHP objects ($resourceBundle->get('Version'), $imagick->getVersion()): \
- resource_bundle_get returns Null so the intl dataset drops lib-icu-cldr, and \
- imagick_get_version_string returns \"\" so the imagick datasets drop \
- lib-imagick-imagemagick (confirmed current failure mode: package-set mismatch \
- on the intl dataset, not a panic)"]
fn test_library_information() {
let extension_version = "100.200.300";