From be3458128ef09b3d1074b134f2822162e077e165 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 5 Aug 2026 03:57:48 +0900 Subject: feat(symfony-console): expose the input __toString on InputInterface Every Symfony input already ports __toString as a Display impl, but callers holding a dyn InputInterface could not reach it; forwarding a command run across the plugin RPC boundary needs the stringified input. Co-Authored-By: Claude Fable 5 --- .../src/symfony/console/input/input_interface.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/shirabe-external-packages/src/symfony/console/input/input_interface.rs') diff --git a/crates/shirabe-external-packages/src/symfony/console/input/input_interface.rs b/crates/shirabe-external-packages/src/symfony/console/input/input_interface.rs index 6ef7877e..e4beca91 100644 --- a/crates/shirabe-external-packages/src/symfony/console/input/input_interface.rs +++ b/crates/shirabe-external-packages/src/symfony/console/input/input_interface.rs @@ -43,6 +43,10 @@ pub trait InputInterface: std::fmt::Debug + shirabe_php_shim::AsAny { fn set_interactive(&mut self, interactive: bool); + /// PHP's `(string) $input` (the `__toString` magic method every Symfony input implements); + /// implementors forward to their `Display` impl. + fn __to_string(&self) -> String; + /// Models PHP's `$input instanceof StreamableInputInterface` check. Streamable inputs override /// this to return `Some(self)`; everything else falls back to `None`. fn as_streamable(&self) -> Option<&dyn StreamableInputInterface> { -- cgit v1.3.1