Enable config:set to set variables inside a nested array of settings (#12772)

* Enable config:set to set variables inside a nested array of settings
Re-index arrays when forgetting a value from a sequential numerically indexed array

* cleanup
This commit is contained in:
Tony Murray
2021-04-26 21:03:03 -05:00
committed by GitHub
parent 7510224ead
commit ebadcbc8af
2 changed files with 101 additions and 7 deletions

View File

@@ -13,14 +13,16 @@ return [
'config:set' => [
'description' => 'Set configuration value (or unset)',
'arguments' => [
'setting' => 'setting to set in dot notation (example: snmp.community.0)',
'setting' => 'setting to set in dot notation (example: snmp.community.0) To append to an array suffix with .+',
'value' => 'value to set, unset setting if this is omitted',
],
'options' => [
'ignore-checks' => 'Ignore all safety checks',
],
'confirm' => 'Reset :setting to the default?',
'forget_from' => 'Forget :path from :parent?',
'errors' => [
'append' => 'Cannot append to non-array setting',
'failed' => 'Failed to set :setting',
'invalid' => 'This is not a valid setting. Please check your spelling',
'nodb' => 'Database is not connected',