aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-07-06 23:54:52 +0900
committernsfisis <nsfisis@gmail.com>2026-07-06 23:54:52 +0900
commit6ab39f42fc5bf05b29f24e315bf3088513b0f626 (patch)
tree165724b8db246961727ac5176422b2d7168453b5 /crates/shirabe
parent7f24ec418432a66da451b7c83042185dca42da9c (diff)
downloadphp-shirabe-6ab39f42fc5bf05b29f24e315bf3088513b0f626.tar.gz
php-shirabe-6ab39f42fc5bf05b29f24e315bf3088513b0f626.tar.zst
php-shirabe-6ab39f42fc5bf05b29f24e315bf3088513b0f626.zip
fix(base-config-command): run BaseCommand::initialize before config setupHEADmain
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 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe')
-rw-r--r--crates/shirabe/src/command/base_config_command.rs9
1 files changed, 6 insertions, 3 deletions
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<std::cell::RefCell<dyn InputInterface>>,
output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
- ) -> 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()