aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/show_command.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-10 02:41:34 +0900
committernsfisis <nsfisis@gmail.com>2026-06-10 02:46:18 +0900
commit2d474e91e49c7343d28198eff2b5bbbed9afbcee (patch)
tree8c1ab321dfa5ddc1ca9d2871eb06a6fde6b2970b /crates/shirabe/src/command/show_command.rs
parente583112899cbea7494ffdd73d7de380dd5f808c4 (diff)
downloadphp-shirabe-2d474e91e49c7343d28198eff2b5bbbed9afbcee.tar.gz
php-shirabe-2d474e91e49c7343d28198eff2b5bbbed9afbcee.tar.zst
php-shirabe-2d474e91e49c7343d28198eff2b5bbbed9afbcee.zip
feat(phase-c): resolve cross-module phase-b TODOs
Diffstat (limited to 'crates/shirabe/src/command/show_command.rs')
-rw-r--r--crates/shirabe/src/command/show_command.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/shirabe/src/command/show_command.rs b/crates/shirabe/src/command/show_command.rs
index 1ce91cb..3761b09 100644
--- a/crates/shirabe/src/command/show_command.rs
+++ b/crates/shirabe/src/command/show_command.rs
@@ -610,7 +610,7 @@ impl ShowCommand {
.get_option("patch-only")
.as_bool()
.unwrap_or(false),
- &*platform_req_filter,
+ platform_req_filter.clone(),
)?;
}
if input.borrow().get_option("outdated").as_bool() == Some(true)
@@ -885,7 +885,7 @@ impl ShowCommand {
show_major_only,
show_minor_only,
show_patch_only,
- &*platform_req_filter,
+ platform_req_filter.clone(),
)?;
if latest.is_none() {
continue;
@@ -2639,7 +2639,7 @@ impl ShowCommand {
major_only: bool,
minor_only: bool,
patch_only: bool,
- platform_req_filter: &dyn PlatformRequirementFilterInterface,
+ platform_req_filter: std::rc::Rc<dyn PlatformRequirementFilterInterface>,
) -> anyhow::Result<Option<crate::package::PackageInterfaceHandle>> {
// find the latest version allowed in this repo set
let name = package.get_name();
@@ -2738,14 +2738,14 @@ impl ShowCommand {
version_compare(&candidate.get_version(), &package_version, "<=")
});
}
- // TODO(phase-b): platform_req_filter needs to be Option<Box<dyn ...>>; current code holds &dyn.
- let _ = platform_req_filter;
+ // TODO(phase-c): PHP passes $showWarnings (true or a closure) as the last argument, but the
+ // closure form requires modeling a callable inside PhpMixed; hardcoding true until then.
let _ = show_warnings_box;
let mut candidate = version_selector.find_best_candidate(
&name,
target_version.as_deref(),
&best_stability,
- None,
+ Some(platform_req_filter),
0,
Some(self.get_io().clone()),
PhpMixed::Bool(true),