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/create_project_command.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/shirabe/src/command/create_project_command.rs') diff --git a/crates/shirabe/src/command/create_project_command.rs b/crates/shirabe/src/command/create_project_command.rs index 6da21f48..3410ad8b 100644 --- a/crates/shirabe/src/command/create_project_command.rs +++ b/crates/shirabe/src/command/create_project_command.rs @@ -9,6 +9,7 @@ use crate::config::ConfigSourceInterface; use crate::config::JsonConfigSource; use crate::console::input::InputArgument; use crate::console::input::InputOption; +use crate::console::input::SuggestedValues; use crate::dependency_resolver::operation::InstallOperation; use crate::factory::Factory; use crate::filter::platform_requirement_filter::IgnoreAllPlatformRequirementFilter; @@ -102,7 +103,7 @@ impl Command for CreateProjectCommand { InputOption::new("remove-vcs", None, Some(InputOption::VALUE_NONE), "Whether to force deletion of the vcs folder without prompting.", None).unwrap().into(), InputOption::new("no-install", None, Some(InputOption::VALUE_NONE), "Whether to skip installation of the package dependencies.", None).unwrap().into(), InputOption::new("no-audit", None, Some(InputOption::VALUE_NONE), "Whether to skip auditing of the installed package dependencies (can also be set via the COMPOSER_NO_AUDIT=1 env var).", 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("no-security-blocking", None, Some(InputOption::VALUE_NONE), "Allows installing packages with security advisories or that are abandoned (can also be set via the COMPOSER_NO_SECURITY_BLOCKING=1 env var).", None).unwrap().into(), InputOption::new("ignore-platform-req", None, Some(InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY), "Ignore a specific platform requirement (php & ext- packages).", None).unwrap().into(), InputOption::new("ignore-platform-reqs", None, Some(InputOption::VALUE_NONE), "Ignore all platform requirements (php & ext- packages).", None).unwrap().into(), -- cgit v1.3.1