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/repository/platform_repository.rs | 7 +++++-- crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs | 15 +++++++-------- crates/shirabe/src/repository/vcs/vcs_driver.rs | 2 -- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'crates/shirabe/src/repository') diff --git a/crates/shirabe/src/repository/platform_repository.rs b/crates/shirabe/src/repository/platform_repository.rs index 1dec137..932584c 100644 --- a/crates/shirabe/src/repository/platform_repository.rs +++ b/crates/shirabe/src/repository/platform_repository.rs @@ -283,9 +283,12 @@ impl PlatformRepository { // The AF_INET6 constant is only defined if ext-sockets is available but // IPv6 support might still be available. let has_inet6 = self.runtime.has_constant("AF_INET6", None); + // PHP: Silencer::call([$this->runtime, 'invoke'], 'inet_pton', ['::']) + // TODO(phase-c): Composer's Platform\Runtime class is entirely a todo!() stub (invoke, + // has_constant, ...), so the inet_pton invocation cannot run. The placeholder callable + // returns false; resolving this requires implementing the Runtime wrapper (separate Phase C + // work) and a closure that forwards to the inet_pton shim. let inet_pton_check = Silencer::call(|| { - // TODO(phase-b): Runtime::invoke takes a Box) -> PhpMixed>; - // mirror PHP's `Silencer::call([$this->runtime, 'invoke'], 'inet_pton', ['::'])`. Ok::(self.runtime.invoke( Box::new(|_args| PhpMixed::Bool(false)), vec![ diff --git a/crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs b/crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs index 59e6b88..b33aa05 100644 --- a/crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs +++ b/crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs @@ -790,14 +790,13 @@ impl GitBitbucketDriver { fn setup_fallback_driver(&mut self, url: &str) -> Result<()> { let mut repo_config: IndexMap = IndexMap::new(); repo_config.insert("url".to_string(), PhpMixed::String(url.to_string())); - // TODO(phase-b): construct VcsDriver from repo_config / io / config / etc. - let mut driver = GitDriver { - inner: todo!("phase-b: build VcsDriver for fallback GitDriver"), - tags: None, - branches: None, - root_identifier: None, - repo_dir: String::new(), - }; + let mut driver = GitDriver::new( + repo_config, + self.inner.io.clone(), + self.inner.config.clone(), + self.inner.http_downloader.clone(), + self.inner.process.clone(), + ); driver.initialize()?; self.fallback_driver = Some(Box::new(driver)); Ok(()) diff --git a/crates/shirabe/src/repository/vcs/vcs_driver.rs b/crates/shirabe/src/repository/vcs/vcs_driver.rs index 740d00e..b197676 100644 --- a/crates/shirabe/src/repository/vcs/vcs_driver.rs +++ b/crates/shirabe/src/repository/vcs/vcs_driver.rs @@ -187,8 +187,6 @@ impl VcsDriverBase { } } -// TODO(phase-b): the constructor is `final` in PHP; concrete implementations must replicate the -// initialization logic (local-path normalization etc.) from the original new() body. pub trait VcsDriver: VcsDriverInterface { fn url(&self) -> &str; fn url_mut(&mut self) -> &mut String; -- cgit v1.3.1