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

Remove user-editable configuration files from distribution / version control #213

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

CyberShadow
Copy link
Contributor

Fixes #208.

Please see #208 (comment) and the commit messages for details.

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.
@CyberShadow
Copy link
Contributor Author

Blocked by #214. Could be ameliorated by changing the .ini file back to a .php one, but doesn't solve the larger issue, just the most urgent one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant