aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/installer.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-28 03:31:41 +0900
committernsfisis <nsfisis@gmail.com>2026-05-28 03:32:04 +0900
commitc7f53c5d7d581ebf76803650c63ec615b1558dc8 (patch)
treec6d83819e82a83cf93ca737b661094a8ea800cec /crates/shirabe/src/installer.rs
parentcc5d73c05a0abca2eebcc8a6afa0b1543ee49850 (diff)
downloadphp-shirabe-refactor/composer-handles.tar.gz
php-shirabe-refactor/composer-handles.tar.zst
php-shirabe-refactor/composer-handles.zip
refactor(composer): represent composer via trait-based handlesrefactor/composer-handles
Replace the PartialComposer/Composer structs and the single Rc<RefCell<PartialOrFullComposer>> enum with PartialComposer and Composer traits (Composer: PartialComposer), InnerPartialComposer / InnerFullComposer data structs, and the handle types FullComposerHandle (impl Composer) and AnyComposerHandle (polymorphic enum, impl PartialComposer), plus their weak variants. Factory builds the full and partial graphs via separate Rc::new_cyclic branches that share a build_composer_base helper. Call sites now use trait methods that encapsulate borrowing instead of borrow_partial() / composer_full*(). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/installer.rs')
-rw-r--r--crates/shirabe/src/installer.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/shirabe/src/installer.rs b/crates/shirabe/src/installer.rs
index 14e75c0..30de843 100644
--- a/crates/shirabe/src/installer.rs
+++ b/crates/shirabe/src/installer.rs
@@ -45,7 +45,7 @@ use shirabe_semver;
use crate::advisory::AuditConfig;
use crate::advisory::Auditor;
use crate::autoload::AutoloadGenerator;
-use crate::composer::PartialComposerHandle;
+use crate::composer::{AnyComposerHandle, Composer, PartialComposer};
use crate::config::Config;
use crate::console::GithubActionError;
use crate::dependency_resolver::DefaultPolicy;
@@ -1646,7 +1646,7 @@ impl Installer {
/// Create Installer
pub fn create(
io: std::rc::Rc<std::cell::RefCell<dyn IOInterface>>,
- composer: &PartialComposerHandle,
+ composer: &AnyComposerHandle,
) -> Self {
let composer = crate::composer::composer_full(composer);
Self::new(