aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-php-shim/src
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-09 07:36:40 +0900
committernsfisis <nsfisis@gmail.com>2026-08-09 07:36:40 +0900
commit627aaead32dcf38bed255012fcf7965d9553f52e (patch)
tree1dd58c19edb8b7d37aa30ac3593b8e1f608b8c32 /crates/shirabe-php-shim/src
parentf1d65c337c63b6aa3582aabc64bfbbb2f949127c (diff)
downloadphp-shirabe-627aaead32dcf38bed255012fcf7965d9553f52e.tar.gz
php-shirabe-627aaead32dcf38bed255012fcf7965d9553f52e.tar.zst
php-shirabe-627aaead32dcf38bed255012fcf7965d9553f52e.zip
fix(dependency-resolver): query the PHP runtime for the php version
Problem reported the platform php version from the shim's compile-time PHP_VERSION constant, and the shim's phpversion() hit todo!() for any extension. Go through the RPC bridge instead, as PHP's Composer\Platform\Runtime does, and drop the shim function that now has no callers. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-php-shim/src')
-rw-r--r--crates/shirabe-php-shim/src/runtime.rs10
1 files changed, 0 insertions, 10 deletions
diff --git a/crates/shirabe-php-shim/src/runtime.rs b/crates/shirabe-php-shim/src/runtime.rs
index 44cae087..ed159abb 100644
--- a/crates/shirabe-php-shim/src/runtime.rs
+++ b/crates/shirabe-php-shim/src/runtime.rs
@@ -185,16 +185,6 @@ pub fn get_loaded_extensions() -> Vec<String> {
.collect()
}
-pub fn phpversion(_extension: &str) -> Option<String> {
- if _extension.is_empty() {
- Some(PHP_VERSION.to_string())
- } else {
- // TODO(php-runtime): per-extension version strings are not modeled; PHP returns the extension's
- // own version, or false when the extension is not loaded.
- todo!()
- }
-}
-
// TODO(php-runtime): the callback should be registered in PHP runtime.
pub fn set_error_handler(_callback: fn(i64, &str, &str, i64) -> bool) {}