aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/console/application.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-07-04 21:17:48 +0900
committernsfisis <nsfisis@gmail.com>2026-07-04 21:17:48 +0900
commit865065217f0e79ca2b359a5c60a2b49b97ff67f8 (patch)
tree18a16022fddb230fae07cfbbabeffdb6b4927378 /crates/shirabe/src/console/application.rs
parent6ba0a31ddfd68ecf8359f8276574bfe9bd5de5fa (diff)
downloadphp-shirabe-865065217f0e79ca2b359a5c60a2b49b97ff67f8.tar.gz
php-shirabe-865065217f0e79ca2b359a5c60a2b49b97ff67f8.tar.zst
php-shirabe-865065217f0e79ca2b359a5c60a2b49b97ff67f8.zip
fix(console-application): implement --profile via IOInterface::enable_debugging
The --profile flag parsed the option but never actually enabled the timing/memory output, because ConsoleIO::enableDebugging existed only as an inherent method, unreachable through the `dyn IOInterface` handle held by Application. Promote enable_debugging to an IOInterface trait method (default panics, since only ConsoleIO/BufferIO ever legitimately receive this call) so do_run can invoke it directly without downcasting.
Diffstat (limited to 'crates/shirabe/src/console/application.rs')
-rw-r--r--crates/shirabe/src/console/application.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/crates/shirabe/src/console/application.rs b/crates/shirabe/src/console/application.rs
index 7c527c6..379add7 100644
--- a/crates/shirabe/src/console/application.rs
+++ b/crates/shirabe/src/console/application.rs
@@ -2475,12 +2475,7 @@ impl ApplicationHandle {
.has_parameter_option(PhpMixed::from(vec!["--profile"]), false)
{
start_time = Some(microtime());
- // PHP: $this->io->enableDebugging($startTime).
- // TODO(phase-c): enableDebugging exists only on ConsoleIO, not on IOInterface,
- // and self.io is still the NullIO because the ConsoleIO construction above is
- // deferred (Symfony HelperSet/Helper modelling). Once self.io is the real
- // ConsoleIO this becomes a concrete-type call on it.
- let _ = start_time.unwrap();
+ io.borrow_mut().enable_debugging(start_time.unwrap());
}
let result = self.base_do_run(input.clone(), output.clone())?;