diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-09 00:20:06 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-09 00:20:06 +0900 |
| commit | 82667e0a1d2c728f2f8f084a5f7591e0fc006dcf (patch) | |
| tree | 56c373a6cbc345f338dc2415e0c1b0f3e8a5df12 /crates/mozart/src/commands/update.rs | |
| parent | 4ab0a1d6ffe9f42a302806ad970bed03a0e1fd86 (diff) | |
| download | php-mozart-82667e0a1d2c728f2f8f084a5f7591e0fc006dcf.tar.gz php-mozart-82667e0a1d2c728f2f8f084a5f7591e0fc006dcf.tar.zst php-mozart-82667e0a1d2c728f2f8f084a5f7591e0fc006dcf.zip | |
refactor(install): Slice A — align install.rs with Composer's InstallCommand pipeline
- Match Composer's deprecation wording for --dev and --no-suggest (A1)
- Add missing URL to lock-fallback warning (A2)
- Reorder arg validation to match InstallCommand::execute order (A3)
- Rename collect_install_* helpers to verify_lock_* and consolidate
into a single verify_lock() entry point (A4)
- Couple classmap_authoritative=true → optimize_autoloader=true,
mirroring Composer's setter side-effects (Installer.php 1263-1272) (A5)
- Centralise is_platform_package in mozart_core::platform, removing
divergent local copies from install.rs and update.rs (A6)
- Move compute_operations, topological_sort, alias helpers, and
locked_to_installed_entry into mozart-registry::installer_executor::
transaction, re-exported from the parent module (A8)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart/src/commands/update.rs')
| -rw-r--r-- | crates/mozart/src/commands/update.rs | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/crates/mozart/src/commands/update.rs b/crates/mozart/src/commands/update.rs index 92a998d..de9c5e3 100644 --- a/crates/mozart/src/commands/update.rs +++ b/crates/mozart/src/commands/update.rs @@ -2,6 +2,7 @@ use clap::Args; use indexmap::{IndexMap, IndexSet}; use mozart_core::console_format; use mozart_core::package::{self, Stability}; +use mozart_core::platform::is_platform_package; use mozart_registry::lockfile; use mozart_registry::resolver::{ self, LockedPackageInfo, PlatformConfig, ResolveRequest, ResolvedPackage, @@ -235,18 +236,6 @@ fn parse_minimum_stability(s: &str) -> Stability { package::Stability::parse(s) } -/// Check whether a package name refers to a platform package (php, ext-*, lib-*, composer-*). -fn is_platform_package(name: &str) -> bool { - let lower = name.to_lowercase(); - lower == "php" - || lower.starts_with("ext-") - || lower.starts_with("lib-") - || lower.starts_with("composer-") - || lower == "composer" - || lower == "composer-runtime-api" - || lower == "composer-plugin-api" -} - /// Compare old lock vs new lock to determine installs, updates, removals, and unchanged packages. /// /// Produces one `UpdateChange` per affected package. Packages that are identical in both |
