From 4df5f8491320e5795718cf0222e80fa27e57c8ad Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 11 May 2026 02:05:34 +0900 Subject: refactor(package): rename traits and switch dep maps to IndexMap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename Package/CompletePackage to PackageInterface/CompletePackageInterface to mirror Composer's interface names, and split each into its own module under crates/mozart-core/src/package/. Switch dependency-link and metadata maps from BTreeMap to indexmap::IndexMap so serialized JSON preserves the original key ordering rather than sorting alphabetically — matching PHP associative-array semantics. The --sort-packages behaviour in `require` is preserved via sort_unstable_keys. --- crates/mozart-class-map-generator/src/classmap.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/mozart-class-map-generator/src/classmap.rs') diff --git a/crates/mozart-class-map-generator/src/classmap.rs b/crates/mozart-class-map-generator/src/classmap.rs index e1631f4..17ca04a 100644 --- a/crates/mozart-class-map-generator/src/classmap.rs +++ b/crates/mozart-class-map-generator/src/classmap.rs @@ -133,18 +133,18 @@ pub fn path_to_static_expr(file: &Path, vendor_dir: &Path, project_dir: &Path) - /// /// Returns `(dynamic_classmap, static_classmap, psr_violations)`. pub fn scan_psr_for_classmap( - psr4: &BTreeMap>, - psr0: &BTreeMap>, + psr4: &indexmap::IndexMap>, + psr0: &indexmap::IndexMap>, vendor_dir: &Path, project_dir: &Path, excluded: &[String], ) -> ( - BTreeMap, - BTreeMap, + indexmap::IndexMap, + indexmap::IndexMap, Vec, ) { - let mut dyn_map: BTreeMap = BTreeMap::new(); - let mut static_map: BTreeMap = BTreeMap::new(); + let mut dyn_map = indexmap::IndexMap::new(); + let mut static_map = indexmap::IndexMap::new(); let mut violations: Vec = Vec::new(); // Helper: resolve a PHP path expression to an absolute path. -- cgit v1.3.1