diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-05 03:57:48 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-05 03:57:48 +0900 |
| commit | be3458128ef09b3d1074b134f2822162e077e165 (patch) | |
| tree | c313e180c63f60b65485e42ed371398dcac2aa3a /crates/shirabe-external-packages/src/symfony/console/input/input_interface.rs | |
| parent | baf82ff950fef512c3e9bfed30747adce034a92a (diff) | |
| download | php-shirabe-be3458128ef09b3d1074b134f2822162e077e165.tar.gz php-shirabe-be3458128ef09b3d1074b134f2822162e077e165.tar.zst php-shirabe-be3458128ef09b3d1074b134f2822162e077e165.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony/console/input/input_interface.rs')
| -rw-r--r-- | crates/shirabe-external-packages/src/symfony/console/input/input_interface.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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> { |
