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/remove_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/remove_command.rs')
| -rw-r--r-- | crates/shirabe/src/command/remove_command.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/shirabe/src/command/remove_command.rs b/crates/shirabe/src/command/remove_command.rs index 4eb4308a..7d9e7d09 100644 --- a/crates/shirabe/src/command/remove_command.rs +++ b/crates/shirabe/src/command/remove_command.rs @@ -8,6 +8,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::UpdateAllowTransitiveDeps; use crate::factory::Factory; use crate::installer::Installer; @@ -87,11 +88,12 @@ impl Command for RemoveCommand { Some(InputOption::VALUE_NONE), "Skip the audit step after updating the composer.lock file (can also be set via the COMPOSER_NO_AUDIT=1 env var).", None).unwrap().into(), - InputOption::new("audit-format", + 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()))).unwrap().into(), + 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), |
