From 6ab39f42fc5bf05b29f24e315bf3088513b0f626 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 6 Jul 2026 23:54:52 +0900 Subject: fix(base-config-command): run BaseCommand::initialize before config setup BaseConfigCommand::initialize skipped the parent BaseCommand::initialize chain (plugin enable/disable resolution, PRE_COMMAND_RUN event dispatch, COMPOSER_NO_* env option overrides), unlike PHP's parent::initialize() call. The trait-disambiguation blocker cited in the old TODO was already solved elsewhere via the base_command_initialize free function; wire it in here too so ConfigCommand and RepositoryCommand match PHP behavior. Co-Authored-By: Claude Sonnet 5 --- crates/shirabe/src/command/base_config_command.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'crates/shirabe') diff --git a/crates/shirabe/src/command/base_config_command.rs b/crates/shirabe/src/command/base_config_command.rs index b218961..a2a51d4 100644 --- a/crates/shirabe/src/command/base_config_command.rs +++ b/crates/shirabe/src/command/base_config_command.rs @@ -1,6 +1,7 @@ //! ref: composer/src/Composer/Command/BaseConfigCommand.php use crate::command::BaseCommand; +use crate::command::base_command::base_command_initialize; use crate::config::Config; use crate::config::JsonConfigSource; use crate::factory::Factory; @@ -23,9 +24,11 @@ pub trait BaseConfigCommand: BaseCommand { &self, input: std::rc::Rc>, output: std::rc::Rc>, - ) -> anyhow::Result<()> { - // TODO(phase-b): BaseCommand::initialize chained via Self::initialize would recurse; - // omitted until trait disambiguation is sorted. + ) -> anyhow::Result<()> + where + Self: Sized, + { + base_command_initialize(self, input.clone(), output.clone())?; if input .borrow() -- cgit v1.3.1