From 8538a375a4ddcfad3fabc8d19ca41c148136b63b Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 20 Jun 2026 22:11:59 +0900 Subject: feat(php-shim): implement parse_url and filter_var URL/boolean filters Back parse_url/parse_url_all with reqwest::Url and add the FILTER_VALIDATE_URL and FILTER_VALIDATE_BOOLEAN arms to filter_var, so Config::prohibit_url_by_config no longer hits todo!(). reqwest::Url is not a byte-for-byte port of PHP's parser; the divergences are noted with TODO(phase-c). Switch the scheme in_array in prohibit_url_by_config to strict: the needle is a string-or-null and the haystack holds only non-numeric string literals, so loose and strict comparison are provably equivalent here, avoiding a dependency on PHP loose `==` semantics. Co-Authored-By: Claude Opus 4.8 (1M context) --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index cf1fcd2..fbfe0d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,6 +20,7 @@ fastrand = "2.4.1" indexmap = { version = "2.14.0", features = ["serde"] } md5 = "0.7.0" regex = "1.12.3" +reqwest = "0.13.4" serde = { version = "1.0.228", features = ["derive"] } serde_json = { version = "1.0.149", features = ["preserve_order"] } sha1 = "0.10.6" -- cgit v1.3.1