From b8a50e25aafb51a6d73f9695362854cc5ed58117 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 7 Jun 2026 18:26:55 +0900 Subject: feat(phase-c): resolve &mut-access phase-b TODOs via handle setters PHP mutator methods that the Phase B port could not call because only &self / &dyn / Rc access was available. Resolved by the interior-mutation APIs that already exist: handle &self setters (set_dist/source_reference, set_requires/dev/references/stability_flags), Rc> .borrow_mut(), and get_installation_manager().borrow_mut() (build_package_map passes an empty/canonical package list per upstream). composer.get_package() returns &RootPackageInterfaceHandle, so the "&dyn" Phase B note was wrong. factory's set_config_source/set_auth_config_source were already live code; their stale TODOs are removed. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/command/init_command.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'crates/shirabe/src/command/init_command.rs') diff --git a/crates/shirabe/src/command/init_command.rs b/crates/shirabe/src/command/init_command.rs index 5a3c71b..f8bdad9 100644 --- a/crates/shirabe/src/command/init_command.rs +++ b/crates/shirabe/src/command/init_command.rs @@ -426,11 +426,19 @@ impl InitCommand { if !input.borrow().is_interactive() { if input.borrow().get_option("name").is_null() { - // TODO(phase-b): input.set_option requires &mut; signature passes &dyn here + let name = self.get_default_package_name(); + input + .borrow_mut() + .set_option("name", PhpMixed::from(name)) + .expect("name option is defined"); } if input.borrow().get_option("author").is_null() { - // TODO(phase-b): input.set_option requires &mut; signature passes &dyn here + let author = self.get_default_author(); + input + .borrow_mut() + .set_option("author", PhpMixed::from(author)) + .expect("author option is defined"); } } } -- cgit v1.3.1