config:app:set has no "type" parameter
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 8.8k
- Forks
- 2.1k
- Avg merge
- 20h 7m
- Merged PRs (30d)
- 41
Description
occ config:system:set has --type parameter and you can set a setting to boolean true or false.
occ config:app:set has no --type parameter. Do something like:
php occ config:app:set files enable_lock_file_action --value true
Actually the setting is string "true". Code that gets the setting ends up understanding that it is boolean true because it is non-zero.
php occ config:app:set files enable_lock_file_action --value false
The setting is string "false". Code that gets the setting ends up understanding that it is boolean true because it is non-zero. But users get confused, it looks false but the functionality is still enabled.
php occ config:app:set files enable_lock_file_action --value 0
Setting to 0 really switched off the setting.
occ config:app:delete files enable_lock_file_action
Deleting the setting allows it to go back to its default of false.
It would be less confusing if we could do:
php occ config:app:set files enable_lock_file_action --type boolean --value false
If the backend database field is only storing a string, then --type boolean --value false could store "0" and --type boolean --value true could store "1".
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the occ config:system:set and config:app:set command entry points and compare how their parameters are handled. Exercise the boolean cases described with --value true, --value false, and --type boolean, then confirm that stored values and later reads distinguish enabled from disabled settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100