From 6ae7e0d4b3eaf20e2d2cd3d000cf61ab0c9b6e83 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 11 Jun 2026 02:39:35 +0900 Subject: feat(console): resolve phase-b TODOs in doRun and IO wiring Wire up ConsoleIO with HelperSet/QuestionHelper, register the ErrorHandler with the IO instance, and fall back to a default output in run(). Replace resolved phase-b TODOs across the console, command, io, factory, installer, dependency_resolver, and util modules; reclassify the remaining blockers (typed Symfony command registry, stdin resource caching) as phase-c. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/util/process_executor.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'crates/shirabe/src/util/process_executor.rs') diff --git a/crates/shirabe/src/util/process_executor.rs b/crates/shirabe/src/util/process_executor.rs index b62debe..75b40cb 100644 --- a/crates/shirabe/src/util/process_executor.rs +++ b/crates/shirabe/src/util/process_executor.rs @@ -261,14 +261,19 @@ impl ProcessExecutor { } } + // PHP: $callback = is_callable($output) ? $output : fn($type, $buffer) => $this->outputHandler($type, $buffer); let output_is_callable = output.as_deref().map(|o| is_callable(o)).unwrap_or(false); let _callback: Box = if output_is_callable { - // TODO(phase-b): adapt output PhpMixed callable to closure + // TODO(phase-c): the user-supplied $output is a PhpMixed callable that cannot be + // invoked without a typed callable model (Rc); deferred with the callable model. Box::new(|_t: &str, _b: &str| {}) } else { - Box::new(|_t: &str, _b: &str| { - // TODO(phase-b): self.output_handler(t, b) — self is borrowed mutably elsewhere - }) + // TODO(phase-c): the fallback must call self.output_handler(type, buffer) (which is + // &mut self and writes to io / updates last_message), but this is a 'static + // `Box` that cannot borrow &mut self. Wiring it needs the handler state shared + // (Rc>). The callback is also not yet passed to process.run, whose Symfony + // Process backing stays todo!(). + Box::new(|_t: &str, _b: &str| {}) }; let io_for_signal = self.io.clone(); -- cgit v1.3.1