-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
occ config:system:set can now set other value types #18444
Conversation
A new inspection was created. |
How do you do nested arrays? See oobjecttstore array in the sample config |
|
@Xenopathic well int, bool and null is nice! But array still lacks nesting support. Please post a command that writes the following to the config: |
@nickvergessen It would be next to impossible to get a command-line syntax to set an entire array at once, that's why I decided to treat array values as subsections almost. So you set each sub-value individually:
Imagine trying to set that in a single command line? |
yeah well, I guess that works as well. Should have that on delete too then? The only other idea I could imagine would be json_encode(), but I guess that's too difficult to achieve, so your solution seems better, just needs proper documentation adjustments: |
Well, TBH I think all 3 commands (get, set, delete) should be merged into one command. The way it would work is like this:
For an example that is already in master, see the new I could implement that in this PR if you'd like? Then another PR to move |
Perhaps not for 8.2 😄 |
@cmonteroluque @DeepDiver1975 Do we want this in 8.2? On the one hand the code is ready - on the other hand it is only a sev3 ticket and an enhancement. |
case 'b': | ||
$value = strtolower($value); | ||
switch ($value) { | ||
case 'true': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong intendation
@MorrisJobke Also, this brings inconsistencies between |
@Xenopathic @MorrisJobke cool |
The problem now is that if we decide to change the behavior or remove commands, these need to be deprecated first, because some admins might have already started using these in scripts. So it would qualify as public API. |
2feeea7
to
097ad37
Compare
|
Integers, doubles, booleans and even arrays can now be set, with the --type=... option. Array setting can be specified by passing multiple name arguments, e.g. `./occ config:system:set redis port --value=123 --type=integer`
097ad37
to
f2cb03e
Compare
@Xenopathic @MorrisJobke please reviews |
Works 👍 |
Tested and works 👍 |
occ config:system:set can now set other value types
Integers, doubles, booleans and even arrays can now be set, with the
--type=...
option. Array setting can be specified by passing multiple name arguments, e.g../occ config:system:set redis port --value=123 --type=integer
Fixes #17687
cc @nickvergessen @DeepDiver1975 @MorrisJobke