diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-29 05:14:02 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-29 05:14:02 +0900 |
| commit | ff90c6b259f597a17d73aaf5c3a437bfdda3e68e (patch) | |
| tree | c94ad6ba70ce1712e2b0dcb24bb285bfac51747b /crates/shirabe/src | |
| parent | e9811c03c93935a30fd144e18bedbfd612a0f674 (diff) | |
| download | php-shirabe-ff90c6b259f597a17d73aaf5c3a437bfdda3e68e.tar.gz php-shirabe-ff90c6b259f597a17d73aaf5c3a437bfdda3e68e.tar.zst php-shirabe-ff90c6b259f597a17d73aaf5c3a437bfdda3e68e.zip | |
feat(repository): instantiate vcs, artifact, path repositories by class
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src')
| -rw-r--r-- | crates/shirabe/src/repository/repository_manager.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/crates/shirabe/src/repository/repository_manager.rs b/crates/shirabe/src/repository/repository_manager.rs index eb755dc..ee5d2d8 100644 --- a/crates/shirabe/src/repository/repository_manager.rs +++ b/crates/shirabe/src/repository/repository_manager.rs @@ -165,6 +165,31 @@ impl RepositoryManager { "Composer\\Repository\\PackageRepository" => Ok(RepositoryInterfaceHandle::new( crate::repository::PackageRepository::new(config), )), + "Composer\\Repository\\VcsRepository" => Ok(RepositoryInterfaceHandle::new( + crate::repository::VcsRepository::new( + config, + self.io.clone(), + self.config.clone(), + self.http_downloader.clone(), + self.event_dispatcher.clone(), + Some(self.process.clone()), + None, + None, + )?, + )), + "Composer\\Repository\\ArtifactRepository" => Ok(RepositoryInterfaceHandle::new( + crate::repository::ArtifactRepository::new(config, self.io.clone())?, + )), + "Composer\\Repository\\PathRepository" => Ok(RepositoryInterfaceHandle::new( + crate::repository::PathRepository::new( + config, + self.io.clone(), + self.config.clone(), + Some(self.http_downloader.clone()), + self.event_dispatcher.clone(), + Some(self.process.clone()), + )?, + )), other => todo!( "Phase B: dynamic class instantiation by class name: {}", other |
