From db7f5bd91c9d43d2d0b66824ed60571f1c478422 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 14 Jun 2026 14:05:35 +0900 Subject: fix(command): resolve infinite recursion in command initialize ConfigCommand/InitCommand::initialize called self.initialize, which resolved to the inherent method itself instead of the inherited BaseCommand::initialize (PHP's parent::initialize), recursing forever. Disambiguate to the trait method. CreateProjectCommand's create_composer_instance/create_audit_config were pure pass-through wrappers that PHP does not override; they recursed into themselves. Remove them so calls resolve to the inherited BaseCommand trait methods (the create_audit_config wrapper also had a &Config vs &mut Config signature mismatch). Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/command/create_project_command.rs | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'crates/shirabe/src/command/create_project_command.rs') diff --git a/crates/shirabe/src/command/create_project_command.rs b/crates/shirabe/src/command/create_project_command.rs index 5579a87..15a64df 100644 --- a/crates/shirabe/src/command/create_project_command.rs +++ b/crates/shirabe/src/command/create_project_command.rs @@ -995,26 +995,6 @@ impl CreateProjectCommand { Ok(installed_from_vcs) } - - // helpers reachable via $this in PHP, defined on BaseCommand here - fn create_composer_instance( - &self, - input: std::rc::Rc>, - io: std::rc::Rc>, - config: Option>, - disable_plugins: bool, - disable_scripts: Option, - ) -> Result { - self.create_composer_instance(input, io, config, disable_plugins, disable_scripts) - } - - fn create_audit_config( - &self, - config: &Config, - input: std::rc::Rc>, - ) -> Result { - self.create_audit_config(config, input) - } } impl HasBaseCommandData for CreateProjectCommand { -- cgit v1.3.1