aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/repository
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-11 02:39:35 +0900
committernsfisis <nsfisis@gmail.com>2026-06-11 02:39:35 +0900
commit6ae7e0d4b3eaf20e2d2cd3d000cf61ab0c9b6e83 (patch)
treee39261f4aa7314fe8c75142670c76591cdaccb92 /crates/shirabe/src/repository
parent5d3232a80be4b989e89cc7ae4e3642cc5acae030 (diff)
downloadphp-shirabe-6ae7e0d4b3eaf20e2d2cd3d000cf61ab0c9b6e83.tar.gz
php-shirabe-6ae7e0d4b3eaf20e2d2cd3d000cf61ab0c9b6e83.tar.zst
php-shirabe-6ae7e0d4b3eaf20e2d2cd3d000cf61ab0c9b6e83.zip
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) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/repository')
-rw-r--r--crates/shirabe/src/repository/platform_repository.rs7
-rw-r--r--crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs15
-rw-r--r--crates/shirabe/src/repository/vcs/vcs_driver.rs2
3 files changed, 12 insertions, 12 deletions
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<dyn Fn(Vec<PhpMixed>) -> PhpMixed>;
- // mirror PHP's `Silencer::call([$this->runtime, 'invoke'], 'inet_pton', ['::'])`.
Ok::<PhpMixed, anyhow::Error>(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<String, PhpMixed> = 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;