From 4361059d3bb27916179acfebb8889f1863319bb9 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 2 Aug 2026 15:44:32 +0900 Subject: fix(command): wire the missed suggested values and correct update's packages args Review of the suggested-values wiring against the PHP originals found: - audit --format (Auditor::FORMATS) and --abandoned (Auditor::ABANDONEDS) had no suggestions; only ignore-severity had been converted - the same constant-passing shape was missed on --audit-format (Auditor::FORMATS) in update, install, require, create-project and remove - update's packages argument used suggest_installed_package(false, true), but PHP's suggestInstalledPackage(false) expands to (false, false); the stray true came from an incorrect old TODO comment, and made platform packages appear among the candidates With these, every one of the 47 suggestedValues sites in the PHP command definitions has a matching new5/new6 call. Co-Authored-By: Claude Fable 5 --- crates/shirabe/src/command/install_command.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/shirabe/src/command/install_command.rs') diff --git a/crates/shirabe/src/command/install_command.rs b/crates/shirabe/src/command/install_command.rs index 7bac166c..fafeb363 100644 --- a/crates/shirabe/src/command/install_command.rs +++ b/crates/shirabe/src/command/install_command.rs @@ -7,6 +7,7 @@ use crate::command::CompletionTrait; use crate::command::base_command::base_command_initialize; use crate::console::input::InputArgument; use crate::console::input::InputOption; +use crate::console::input::SuggestedValues; use crate::installer::Installer; use crate::io::IOInterfaceImmutable; use crate::plugin::CommandEvent; @@ -59,7 +60,7 @@ impl Command for InstallCommand { InputOption::new("no-progress", None, Some(InputOption::VALUE_NONE), "Do not output download progress.", None).unwrap().into(), InputOption::new("no-install", None, Some(InputOption::VALUE_NONE), "Do not use, only defined here to catch misuse of the install command.", None).unwrap().into(), InputOption::new("audit", None, Some(InputOption::VALUE_NONE), "Run an audit after installation is complete.", None).unwrap().into(), - InputOption::new("audit-format", None, Some(InputOption::VALUE_REQUIRED), "Audit output format. Must be \"table\", \"plain\", \"json\", or \"summary\".", Some(PhpMixed::String(Auditor::FORMAT_SUMMARY.to_string()))).unwrap().into(), + InputOption::new6("audit-format", None, Some(InputOption::VALUE_REQUIRED), "Audit output format. Must be \"table\", \"plain\", \"json\", or \"summary\".", Some(PhpMixed::String(Auditor::FORMAT_SUMMARY.to_string())), SuggestedValues::List(Auditor::FORMATS.iter().map(|s| s.to_string()).collect())).unwrap().into(), InputOption::new("verbose", Some(PhpMixed::String("v|vv|vvv".to_string())), Some(InputOption::VALUE_NONE), "Shows more details including new commits pulled in when updating packages.", None).unwrap().into(), InputOption::new("optimize-autoloader", Some(PhpMixed::String("o".to_string())), Some(InputOption::VALUE_NONE), "Optimize autoloader during autoloader dump", None).unwrap().into(), InputOption::new("classmap-authoritative", Some(PhpMixed::String("a".to_string())), Some(InputOption::VALUE_NONE), "Autoload classes from the classmap only. Implicitly enables `--optimize-autoloader`.", None).unwrap().into(), -- cgit v1.3.1