Remove user-editable configuration files from distribution / version control#213
Open
CyberShadow wants to merge 5 commits into
Open
Remove user-editable configuration files from distribution / version control#213CyberShadow wants to merge 5 commits into
CyberShadow wants to merge 5 commits into
Conversation
Previously, users needed to edit the secrets.php file before they could use HashOver. This requirement posed a number of problems, such as a needlessly-complicated upgrade procedure. This commit moves the configuration to an .ini file in the config/ directory. A secrets.ini is not included - instead, there is a secrets.ini.sample file, which users can copy to secrets.ini before editing. This allows simpler upgrades by means of a 'git pull' or 'tar xf ...'. The .ini file format was chosen as it is directly supported by the PHP core (as INI support is needed by PHP itself to read php.ini), allows comments (unlike JSON), and has a simple and obvious syntax. Moving the file to be edited away from backend/classes/ and into config/ also makes it more discoverable.
This fixes failing to save the configuration in the administration interface when the configuration files are missing.
As of the previous commit, it is no longer necessary to include them in the distribution - in their absence, HashOver will use the default values, and the administration interface will create them when saving the configuration for the first time.
Contributor
Author
|
Blocked by #214. Could be ameliorated by changing the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #208.
Please see #208 (comment) and the commit messages for details.