From 69c372ba0eca61b05260d6d208445d9e69d14e34 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 13 Jun 2026 11:38:20 +0900 Subject: fix(console): flatten Application inheritance to restore overrides Composer\Console\Application embedded Symfony's Application as an `inner` field and delegated to it, so polymorphic calls inside the Symfony base (e.g. doRun -> $this->getLongVersion()) resolved to Symfony's own methods and never reached Composer's overrides. As a result `--version` bypassed Composer's getLongVersion()/doRun() entirely. Flatten the PHP inheritance chain into the single shirabe Application struct: take in the Symfony base methods (parent-calling overrides kept under a `base_` prefix) and drop the `inner` delegation. Replace the Symfony Application struct in shirabe-external-packages with an `Application` trait that the merged struct implements, so commands and descriptors can reference it without a reverse crate dependency. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../src/symfony/console/formatter/output_formatter_style_stack.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'crates/shirabe-external-packages/src/symfony/console/formatter') diff --git a/crates/shirabe-external-packages/src/symfony/console/formatter/output_formatter_style_stack.rs b/crates/shirabe-external-packages/src/symfony/console/formatter/output_formatter_style_stack.rs index 2b290db..71474bc 100644 --- a/crates/shirabe-external-packages/src/symfony/console/formatter/output_formatter_style_stack.rs +++ b/crates/shirabe-external-packages/src/symfony/console/formatter/output_formatter_style_stack.rs @@ -1,7 +1,6 @@ use crate::symfony::console::exception::invalid_argument_exception::InvalidArgumentException; use crate::symfony::console::formatter::output_formatter_style::OutputFormatterStyle; use crate::symfony::console::formatter::output_formatter_style_interface::OutputFormatterStyleInterface; -use crate::symfony::contracts::service::reset_interface::ResetInterface; #[derive(Debug)] pub struct OutputFormatterStyleStack { @@ -98,11 +97,8 @@ impl OutputFormatterStyleStack { pub fn get_empty_style(&self) -> &dyn OutputFormatterStyleInterface { self.empty_style.as_ref() } -} -impl ResetInterface for OutputFormatterStyleStack { - /// Resets stack (ie. empty internal arrays). - fn reset(&mut self) { + pub fn reset(&mut self) { self.styles = vec![]; } } -- cgit v1.3.1