diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-02 15:44:32 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-02 15:44:32 +0900 |
| commit | 4361059d3bb27916179acfebb8889f1863319bb9 (patch) | |
| tree | 2e9a42fba19abe233cdb9cceb26b5909e54e95ee /crates/shirabe/src/command/create_project_command.rs | |
| parent | 69b35b0c4d8cb583b389973b096f9dd2dee695c6 (diff) | |
| download | php-shirabe-4361059d3bb27916179acfebb8889f1863319bb9.tar.gz php-shirabe-4361059d3bb27916179acfebb8889f1863319bb9.tar.zst php-shirabe-4361059d3bb27916179acfebb8889f1863319bb9.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/create_project_command.rs')
| -rw-r--r-- | crates/shirabe/src/command/create_project_command.rs | 3 |
1 files changed, 2 insertions, 1 deletions
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(), |
