diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-20 21:40:32 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-20 21:40:32 +0900 |
| commit | 0b17152889f2096199a24a87df59ade2dca6e1a0 (patch) | |
| tree | 0390af199a337ceec002ec07bcf74a88fd73b0f0 /crates/shirabe/src/command | |
| parent | 6a46e7fde3582bdb3335fab1139ebb8ed98a0dc4 (diff) | |
| download | php-shirabe-0b17152889f2096199a24a87df59ade2dca6e1a0.tar.gz php-shirabe-0b17152889f2096199a24a87df59ade2dca6e1a0.tar.zst php-shirabe-0b17152889f2096199a24a87df59ade2dca6e1a0.zip | |
feat(outdated): proxy execute to show via shared Application
The execute() proxy was left as todo!(); wire it to the shared
Application handle so `outdated` re-enters the run flow as `show -l`,
matching PHP's $this->getApplication()->run(). Add Application::shared()
to expose the new_shared self-reference and un-ignore run_outdated.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command')
| -rw-r--r-- | crates/shirabe/src/command/outdated_command.rs | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/crates/shirabe/src/command/outdated_command.rs b/crates/shirabe/src/command/outdated_command.rs index 22dd120..16a4ac5 100644 --- a/crates/shirabe/src/command/outdated_command.rs +++ b/crates/shirabe/src/command/outdated_command.rs @@ -214,10 +214,23 @@ impl Command for OutdatedCommand { )?; let input: Rc<RefCell<dyn InputInterface>> = Rc::new(RefCell::new(input)); - // TODO(phase-c): proxying to ShowCommand via Application::run needs the shared shirabe - // Application handle (deferred with the Application shared-ownership work and registration). - let _ = (input, output); - todo!("outdated command proxy run pending shared Application handle") + + let application = { + let application = self + .get_application() + .expect("a proxy command is always attached to its application"); + let application = application.borrow(); + application + .as_any() + .downcast_ref::<crate::console::application::Application>() + .expect("shirabe always installs its own Application") + .shared() + }; + + Ok( + crate::console::application::Application::run(&application, Some(input), Some(output))? + as i64, + ) } fn initialize( |
