From 632c9793927a30c4bca3c91888e66b369d732dfe Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 8 Jun 2026 04:22:49 +0900 Subject: feat(phase-c): resolve PhpMixed-conversion phase-b TODOs Implement the foundational PhpMixed conversion infrastructure (From, order-sensitive PartialEq matching PHP ===) and resolve the category-G phase-b TODOs that depend on it: - Fix VCS driver cache paths that discarded parsed JSON or diverged on null caches (svn/forgejo/gitlab/git-bitbucket/github). - Wire up real conversions previously stubbed or dropped: suggests platform config, audit ignore-severities, composer_repository search and ProviderInfo, class_loader prefix/classmap merges, locker lock diff comparison, advisory JSON serialization, SPDX license fields. - Make GenericRule take a typed ReasonData; populate RULE_ROOT_REQUIRE with the constraint and convert PhpMixed at the call sites. --- crates/shirabe/src/json/json_file.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'crates/shirabe/src/json') diff --git a/crates/shirabe/src/json/json_file.rs b/crates/shirabe/src/json/json_file.rs index b8372b9..a185084 100644 --- a/crates/shirabe/src/json/json_file.rs +++ b/crates/shirabe/src/json/json_file.rs @@ -349,7 +349,7 @@ impl JsonFile { } // PHP: $schemaData = (object) ['$ref' => $schemaFile, '$schema' => "https://json-schema.org/draft-04/schema#"]; - // TODO(phase-b): represent (object) cast as PhpMixed::Array or a dedicated stdClass shim + // A string-keyed `PhpMixed::Array` serializes as a JSON object, matching the (object) cast. let mut schema_data: PhpMixed = { let mut m = indexmap::IndexMap::new(); m.insert( @@ -367,7 +367,6 @@ impl JsonFile { if schema == Self::STRICT_SCHEMA && is_composer_schema_file { schema_data = json_decode(&file_get_contents(&schema_file).unwrap_or_default(), false)?; - // TODO(phase-b): mutate object properties; using PhpMixed::Array we set keys if let PhpMixed::Array(map) = &mut schema_data { map.insert( "additionalProperties".to_string(), -- cgit v1.3.1