aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/require_command.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-20 03:08:31 +0900
committernsfisis <nsfisis@gmail.com>2026-06-20 03:09:22 +0900
commit25fa6c6b079b100f1c3970662d06d63bd741c1f0 (patch)
treefb564230eb241d11e9616119ae5badc45e8caf30 /crates/shirabe/src/command/require_command.rs
parent7d06a493514c20338278c8ffdf0ba2e0f0eed353 (diff)
downloadphp-shirabe-25fa6c6b079b100f1c3970662d06d63bd741c1f0.tar.gz
php-shirabe-25fa6c6b079b100f1c3970662d06d63bd741c1f0.tar.zst
php-shirabe-25fa6c6b079b100f1c3970662d06d63bd741c1f0.zip
refactor(package-discovery): extend BaseCommand as supertrait
PHP's PackageDiscoveryTrait is mixed into classes extending BaseCommand and calls its methods directly. Model that with a supertrait bound so get_io, try_composer, require_composer, get_platform_requirement_filter and normalize_requirements come from BaseCommand instead of being redeclared and delegated per command. Propagate the Result returns at the call sites and drop the now-redundant per-command impls. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/require_command.rs')
-rw-r--r--crates/shirabe/src/command/require_command.rs29
1 files changed, 0 insertions, 29 deletions
diff --git a/crates/shirabe/src/command/require_command.rs b/crates/shirabe/src/command/require_command.rs
index 3d8331b..a29f60d 100644
--- a/crates/shirabe/src/command/require_command.rs
+++ b/crates/shirabe/src/command/require_command.rs
@@ -107,35 +107,6 @@ impl PackageDiscoveryTrait for RequireCommand {
) -> &mut IndexMap<String, std::rc::Rc<std::cell::RefCell<RepositorySet>>> {
&mut self.repository_sets
}
-
- fn get_io(&self) -> std::rc::Rc<std::cell::RefCell<dyn IOInterface>> {
- todo!()
- }
-
- fn try_composer(&self) -> Option<PartialComposerHandle> {
- todo!()
- }
-
- fn require_composer(
- &self,
- disable_plugins: Option<bool>,
- disable_scripts: Option<bool>,
- ) -> PartialComposerHandle {
- todo!()
- }
-
- fn get_platform_requirement_filter(
- &self,
- input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
- ) -> std::rc::Rc<
- dyn crate::filter::platform_requirement_filter::PlatformRequirementFilterInterface,
- > {
- todo!()
- }
-
- fn normalize_requirements(&self, requires: Vec<String>) -> Vec<IndexMap<String, String>> {
- todo!()
- }
}
impl Command for RequireCommand {