Skip to content

feat(core): cast valid booleans when setting system configs#58868

Open
skjnldsv wants to merge 1 commit intomasterfrom
feat/cast-bool-system-config
Open

feat(core): cast valid booleans when setting system configs#58868
skjnldsv wants to merge 1 commit intomasterfrom
feat/cast-bool-system-config

Conversation

@skjnldsv
Copy link
Member

I think we could be smarter with primitive values like those 🙈

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@skjnldsv skjnldsv added this to the Nextcloud 34 milestone Mar 11, 2026
@skjnldsv skjnldsv self-assigned this Mar 11, 2026
@skjnldsv skjnldsv requested a review from a team as a code owner March 11, 2026 14:47
@skjnldsv skjnldsv added 3. to review Waiting for reviews papercut Annoying recurring UX issue with possibly simple fix. labels Mar 11, 2026
@skjnldsv skjnldsv requested review from CarlSchwan, artonge, come-nc and icewind1991 and removed request for a team March 11, 2026 14:47
Copy link
Contributor

@come-nc come-nc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But that would mean when setting a configuration to "false" or "true" it would automagically decide that it’s a boolean even if we indicated type string?
That seems dangerous to me.
Maybe output a warning but do not change the type on the fly.

Otherwise how would one set a configuration to the string "true", it would not be possible anymore?

@skjnldsv
Copy link
Member Author

skjnldsv commented Mar 17, 2026

But that would mean when setting a configuration to "false" or "true" it would automagically decide that it’s a boolean even if we indicated type string? That seems dangerous to me. Maybe output a warning but do not change the type on the fly.

Otherwise how would one set a configuration to the string "true", it would not be possible anymore?

We do not have any
https://github.com/nextcloud/server/blob/bb4c9ecc0e316782227570257856891995b1e369/config/config.sample.php

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
artonge

This comment was marked as outdated.

Copy link
Collaborator

@artonge artonge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just saw that Côme had the same comment. Given your answer, I say let's go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews papercut Annoying recurring UX issue with possibly simple fix.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants