civicrm.settings.php.template - Simplify examples of $civicrm_setting
#16636
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This simplifies the examples in
civicrm.settings.php.template
.Before
Every reference to
$civicrm_setting
uses a different, English-looking group-name.After
All examples use
domain
.Comments
Since CiviCRM v4.7, expessions like
$civicrm_setting['URL Preferences']
have been aliases for$civicrm_setting['domain']
. (SeeSettingsManager::parseMandatorySettings()
.)These examples were initially kept in the verbose 4.6 format so that users of 4.6 and 4.7 could continue to exchange examples with each other. But 4.6 and 4.7 are pretty old, so I don't think that's an issue anymore. We're now firmly in the 5.x world.
What does still matter is intuition - if the examples set an expectation that you should put things under buckets like
URL Preferences
, then it implies that you should be thinking about those buckets. (Does theext_repo_url
belong underExtension Preferences
orURL Preferences
? Can I make up new groups? If I know the name used by the Setting API, then how do I figure out the group-name used for the$civicrm_setting
override? ... The answer to all of these questions is that it doesn't matter because they're really the same group.)(Aside: For the curious... there are two namespaces,
domain
andcontact
. But we rarely usecontact
. It would be possible but exceedingly unusual to override a contact preference viacivicrm.settings.php
. So in practice everything isdomain
.)