Clarify which config keys support --json and --merge
the config docs said --json and --merge only apply to extra.*, but they also work for policy.*.ignore, policy.advisories.ignore-id and audit.ignore[-abandoned] (plus --json for policy.ignore-unreachable), where --merge does not need --json. listed the supported keys in the docs and option help, and noted the flags are ignored for other keys. Closes #11873
This commit is contained in:
1 parent
080aca2673
commit
1a98d2c35a
2 files changed
+10
-4
No files matched your search
+8
-2
@@ -881,8 +881,14 @@ See the [Config](06-config.md) chapter for valid configuration options.
|
||||
that this cannot be used in conjunction with the `--global` option.
|
||||
* **--absolute:** Returns absolute paths when fetching `*-dir` config values
|
||||
instead of relative.
|
||||
* **--json:** JSON decode the setting value, to be used with `extra.*` keys.
|
||||
* **--merge:** Merge the setting value with the current value, to be used with `extra.*` keys in combination with `--json`.
|
||||
* **--json:** JSON decode the setting value. Only supported for `extra.*`,
|
||||
`policy.*.ignore`, `policy.advisories.ignore-id`, `policy.ignore-unreachable`,
|
||||
`audit.ignore` and `audit.ignore-abandoned` keys, it is ignored for all other keys.
|
||||
* **--merge:** Merge the setting value with the current value instead of replacing
|
||||
it. Only supported for `extra.*` keys in combination with `--json`, and for
|
||||
`policy.*.ignore`, `policy.advisories.ignore-id`, `audit.ignore` and
|
||||
`audit.ignore-abandoned` keys with or without `--json`. It is ignored for all
|
||||
other keys.
|
||||
* **--append:** When adding a repository, append it (lowest priority) to the existing ones instead of prepending it (highest priority).
|
||||
* **--source:** Display where the config value is loaded from.
|
||||
|
||||
|
||||
@@ -82,8 +82,8 @@ class ConfigCommand extends BaseConfigCommand
|
||||
new InputOption('list', 'l', InputOption::VALUE_NONE, 'List configuration settings'),
|
||||
new InputOption('file', 'f', InputOption::VALUE_REQUIRED, 'If you want to choose a different composer.json or config.json'),
|
||||
new InputOption('absolute', null, InputOption::VALUE_NONE, 'Returns absolute paths when fetching *-dir config values instead of relative'),
|
||||
new InputOption('json', 'j', InputOption::VALUE_NONE, 'JSON decode the setting value, to be used with extra.* keys'),
|
||||
new InputOption('merge', 'm', InputOption::VALUE_NONE, 'Merge the setting value with the current value, to be used with extra.* or audit.ignore[-abandoned] keys in combination with --json'),
|
||||
new InputOption('json', 'j', InputOption::VALUE_NONE, 'JSON decode the setting value, only supported for extra.*, policy.*.ignore, policy.advisories.ignore-id, policy.ignore-unreachable and audit.ignore[-abandoned] keys'),
|
||||
new InputOption('merge', 'm', InputOption::VALUE_NONE, 'Merge the setting value with the current value, only supported for extra.* keys in combination with --json, and for policy.*.ignore, policy.advisories.ignore-id and audit.ignore[-abandoned] keys'),
|
||||
new InputOption('append', null, InputOption::VALUE_NONE, 'When adding a repository, append it (lowest priority) to the existing ones instead of prepending it (highest priority)'),
|
||||
new InputOption('source', null, InputOption::VALUE_NONE, 'Display where the config value is loaded from'),
|
||||
new InputArgument('setting-key', null, 'Setting key', null, $this->suggestSettingKeys()),
|
||||
|
||||
Reference in new issue
Block a user