aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands/check_platform_reqs.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-22 16:37:49 +0900
committernsfisis <nsfisis@gmail.com>2026-02-22 16:37:49 +0900
commitb696eb7608d921ae0e14a4296e412c33340ceee8 (patch)
tree9a6937bed42ee550553fdb118b9281d00cdce4d9 /crates/mozart/src/commands/check_platform_reqs.rs
parent6490fe43676919bc1dcc8659ec4e52da225f92e6 (diff)
downloadphp-mozart-b696eb7608d921ae0e14a4296e412c33340ceee8.tar.gz
php-mozart-b696eb7608d921ae0e14a4296e412c33340ceee8.tar.zst
php-mozart-b696eb7608d921ae0e14a4296e412c33340ceee8.zip
refactor: reorganize crates to match Composer subpackage structure
Rename mozart-constraint to mozart-semver (mirrors composer/semver) and extract mozart-class-map-generator from mozart-autoload (mirrors composer/class-map-generator). No logic changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart/src/commands/check_platform_reqs.rs')
-rw-r--r--crates/mozart/src/commands/check_platform_reqs.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/mozart/src/commands/check_platform_reqs.rs b/crates/mozart/src/commands/check_platform_reqs.rs
index 295f9b7..79a1da7 100644
--- a/crates/mozart/src/commands/check_platform_reqs.rs
+++ b/crates/mozart/src/commands/check_platform_reqs.rs
@@ -279,21 +279,21 @@ fn check_requirements(
}
Some(detected) => {
// Check all constraints
- let detected_version = match mozart_constraint::Version::parse(&detected.version) {
+ let detected_version = match mozart_semver::Version::parse(&detected.version) {
Ok(v) => v,
Err(_) => {
// Unparseable version → treat as 0.0.0
- mozart_constraint::Version::parse("0.0.0").unwrap()
+ mozart_semver::Version::parse("0.0.0").unwrap()
}
};
let mut failed_req: Option<(String, String)> = None;
for req in reqs {
- let constraint =
- match mozart_constraint::VersionConstraint::parse(&req.constraint) {
- Ok(c) => c,
- Err(_) => continue, // skip unparseable constraints
- };
+ let constraint = match mozart_semver::VersionConstraint::parse(&req.constraint)
+ {
+ Ok(c) => c,
+ Err(_) => continue, // skip unparseable constraints
+ };
if !constraint.matches(&detected_version) {
failed_req = Some((req.constraint.clone(), req.provider.clone()));
break;