Skip to content

Commit 5c99ec8

Browse files
committed
feature #57518 Unify how --format is handled by commands (fabpot)
This PR was merged into the 7.2 branch. Discussion ---------- Unify how --format is handled by commands | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Issues | n/a <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | License | MIT We have many commands that have a `--format` option. This PR tries to unify the way we handle them: * Deprecate the `text` format (used only twice) in favor of the more common `txt` one; * Add auto-completion for `--format` in all commands; * Add help about the `--format` option in all commands that supports it (in a unified way) **Side note**: To avoid confusion, I think we should rename the `--format` option for the `uuid:generate` and `ulid:generate` commands as it does something different from the commonly used `--format` option. Commits ------- 848f855cdf Unify how --format is handle by commands
2 parents 717223d + 8c1030c commit 5c99ec8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Command/DebugCommand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ private function completeOptions(string $class, CompletionSuggestions $suggestio
272272
$suggestions->suggestValues($resolvedType->getOptionsResolver()->getDefinedOptions());
273273
}
274274

275+
/** @return string[] */
275276
private function getAvailableFormatOptions(): array
276277
{
277278
return (new DescriptorHelper())->getFormats();

0 commit comments

Comments
 (0)