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/console | |
| 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/console')
| -rw-r--r-- | crates/shirabe/src/console/application.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/shirabe/src/console/application.rs b/crates/shirabe/src/console/application.rs index 4f7754d..7fa6720 100644 --- a/crates/shirabe/src/console/application.rs +++ b/crates/shirabe/src/console/application.rs @@ -246,6 +246,14 @@ impl Application { Ok(application) } + /// Returns the shared handle to this application set up by `new_shared`. Proxy commands use it to + /// re-enter the run flow (PHP's `$this->getApplication()->run(...)`). + pub fn shared(&self) -> std::rc::Rc<std::cell::RefCell<Application>> { + self.me + .upgrade() + .expect("Application must be constructed through new_shared") + } + /// Registers the default commands on a shared application (PHP's lazy `init()`), executed once /// with no application borrow held so each `set_application` can borrow back safely. fn init_shared( |
