aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands/remove.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-02 17:30:27 +0900
committernsfisis <nsfisis@gmail.com>2026-05-02 17:30:27 +0900
commit99a33b951502d3e80eb70f53551413b9dc0f4d6c (patch)
tree9716d7ac568070032ea7b3141b6763c3443c4589 /crates/mozart/src/commands/remove.rs
parent43efd895d24b7ccd2853fa5bcf08ad0e621f33ce (diff)
downloadphp-mozart-99a33b951502d3e80eb70f53551413b9dc0f4d6c.tar.gz
php-mozart-99a33b951502d3e80eb70f53551413b9dc0f4d6c.tar.zst
php-mozart-99a33b951502d3e80eb70f53551413b9dc0f4d6c.zip
refactor(commands): split install/update into CLI execute + library run
Carve commands::install::execute and commands::update::execute into thin CLI-arg-driven wrappers + run() entry points that take (working_dir, args, console, repositories, executor) directly. The wrappers build a production RepositorySet (Packagist) + FilesystemExecutor from cli, then dispatch to run; in-process tests will call run directly with an empty RepositorySet (Composer's `'packagist' => false` test config) and a tracing InstallerExecutor. The install -> update fallback (no composer.lock present) now goes through update::run, forwarding the caller's repositories + executor so test mocks survive the edge. Also drop the now-dead InstallConfig::no_cache field — install_from_lock stopped consuming the cache when FilesystemExecutor was extracted in the earlier DI plumbing pass, so the field has no effect. All 136 enabled installer fixtures + 114 mozart-registry tests + 541 mozart lib tests still green; clippy clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart/src/commands/remove.rs')
-rw-r--r--crates/mozart/src/commands/remove.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/crates/mozart/src/commands/remove.rs b/crates/mozart/src/commands/remove.rs
index 8794a10..e499af0 100644
--- a/crates/mozart/src/commands/remove.rs
+++ b/crates/mozart/src/commands/remove.rs
@@ -452,7 +452,6 @@ pub async fn execute(
apcu_autoloader_prefix: args.apcu_autoloader_prefix.clone(),
download_only: false,
prefer_source: false,
- no_cache: cli.no_cache,
},
console,
&mut executor,
@@ -606,7 +605,6 @@ async fn remove_unused(
apcu_autoloader_prefix: args.apcu_autoloader_prefix.clone(),
download_only: false,
prefer_source: false,
- no_cache,
},
console,
&mut executor,