Skip to content
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

feat(lexicon): configurable default value #49848

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

ArtificialOwl
Copy link
Member

@ArtificialOwl ArtificialOwl commented Dec 13, 2024

This feature require that the config key is listed in the Config Lexicon.

  • add a new system config key 'lexicon.default.userconfig' that overwrite default userconfig value:
   'lexicon.default.userconfig' => ['core' => ['lang' => 'fr']],
  • add a new system config key 'lexicon.default.userconfig.enforced' that lock config value to default:
   'lexicon.default.userconfig.enforced' => ['core' => ['lang' => true]],

(enforced default value will be chosen from the one stored in config.php, the one set in the lexicon then to the one from the code)

  • add a CoreConfigLexicon for 'core' config keys

also some improvement in the resource management

  • extract default value only if needed,
  • lazy conversion of default to string.

@ArtificialOwl ArtificialOwl added the 2. developing Work in progress label Dec 13, 2024
@ArtificialOwl ArtificialOwl added this to the Nextcloud 31 milestone Dec 13, 2024
Base automatically changed from feature/noid/config-lexicon to master December 16, 2024 15:26
@ArtificialOwl ArtificialOwl force-pushed the feat/noid/lexicon-configurable-default-value branch 6 times, most recently from 24e95fc to 422dcb2 Compare December 17, 2024 10:47
@ArtificialOwl ArtificialOwl added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Dec 17, 2024
@blizzz blizzz mentioned this pull request Jan 8, 2025
core/Command/Config/App/GetConfig.php Outdated Show resolved Hide resolved
lib/private/Config/Lexicon/CoreConfigLexicon.php Outdated Show resolved Hide resolved
lib/private/Config/UserConfig.php Show resolved Hide resolved
lib/private/Config/UserConfig.php Outdated Show resolved Hide resolved
@ArtificialOwl ArtificialOwl force-pushed the feat/noid/lexicon-configurable-default-value branch from 422dcb2 to 824f954 Compare January 9, 2025 10:43
lib/private/Config/Lexicon/CoreConfigLexicon.php Outdated Show resolved Hide resolved
lib/private/Config/Lexicon/CoreConfigLexicon.php Outdated Show resolved Hide resolved
lib/private/Config/Lexicon/CoreConfigLexicon.php Outdated Show resolved Hide resolved
lib/private/Config/UserConfig.php Outdated Show resolved Hide resolved
lib/private/Config/UserConfig.php Outdated Show resolved Hide resolved
@ArtificialOwl ArtificialOwl force-pushed the feat/noid/lexicon-configurable-default-value branch from 824f954 to e65fb5c Compare January 9, 2025 13:39
@ArtificialOwl ArtificialOwl force-pushed the feat/noid/lexicon-configurable-default-value branch from 4296647 to 28acc00 Compare January 14, 2025 11:38
@skjnldsv skjnldsv mentioned this pull request Jan 14, 2025
@ArtificialOwl ArtificialOwl merged commit 93a64d6 into master Jan 14, 2025
188 checks passed
@ArtificialOwl ArtificialOwl deleted the feat/noid/lexicon-configurable-default-value branch January 14, 2025 16:12
@skjnldsv skjnldsv mentioned this pull request Jan 16, 2025
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants