aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart-registry
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-09 14:44:26 +0900
committernsfisis <nsfisis@gmail.com>2026-05-09 14:44:38 +0900
commit0802fd44ed11283f15900d2993fc495acf1bed01 (patch)
treee0e072dbbf3a7cbaa5f2be22682f6070ec2b7ea1 /crates/mozart-registry
parent75b15f58b778b4574e74c86c103b7e36baf4eeb3 (diff)
downloadphp-mozart-0802fd44ed11283f15900d2993fc495acf1bed01.tar.gz
php-mozart-0802fd44ed11283f15900d2993fc495acf1bed01.tar.zst
php-mozart-0802fd44ed11283f15900d2993fc495acf1bed01.zip
refactor(commands): consolidate get_platform_requirement_filter into shared module
Removes the per-command duplicate implementations of get_platform_requirement_filter from dump_autoload and reinstall, and lifts a single canonical version into commands.rs.
Diffstat (limited to 'crates/mozart-registry')
-rw-r--r--crates/mozart-registry/src/cache.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/mozart-registry/src/cache.rs b/crates/mozart-registry/src/cache.rs
index 3ba3258..39e3e8d 100644
--- a/crates/mozart-registry/src/cache.rs
+++ b/crates/mozart-registry/src/cache.rs
@@ -298,7 +298,7 @@ impl Cache {
/// Each top-level subdirectory is one bare mirror keyed by sanitized URL.
/// Deletes entire subdirectories whose mtime is older than `ttl_seconds`.
/// Mirrors Composer's `Cache::gcVcsCache`.
- pub fn gc_vcs(&self, ttl_seconds: u64) -> anyhow::Result<()> {
+ pub fn gc_vcs_cache(&self, ttl_seconds: u64) -> anyhow::Result<()> {
if !self.enabled || !self.root.exists() {
return Ok(());
}
@@ -541,7 +541,7 @@ mod tests {
)
.unwrap();
- cache.gc_vcs(3600).unwrap();
+ cache.gc_vcs_cache(3600).unwrap();
assert!(!old_mirror.exists(), "expired mirror should be removed");
assert!(new_mirror.exists(), "fresh mirror should remain");