mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-31 19:58:59 -04:00
* feat(cli): add reconfigure-user.php to read/write per-user config attributes Closes #8869. Adds `cli/reconfigure-user.php`, a first-class CLI for per-user configuration attributes — the user-level equivalent of the existing `reconfigure.php` (system config). ### Usage ```sh # List all attributes (sensitive keys redacted by default) ./cli/reconfigure-user.php --user alice --list ./cli/reconfigure-user.php --user alice --list --show-secrets # Read a single attribute (exit 2 if key not found) ./cli/reconfigure-user.php --user alice --key language # Set an attribute (type inferred from existing value: bool, int, string) ./cli/reconfigure-user.php --user alice --key language --set --value fr # Set from stdin (recommended for secrets — keeps value out of shell history / ps) ./cli/reconfigure-user.php --user alice --key some_token --set --value-stdin < token.txt # Create a new key, e.g. for an extension (unknown keys rejected by default) ./cli/reconfigure-user.php --user alice --key my_ext_setting --set --value hello --force # Delete an attribute (exit 2 if key not found) ./cli/reconfigure-user.php --user alice --key some_token --unset ``` ### Changes - `cli/reconfigure-user.php` — new command - `lib/Minz/Configuration::toArray()` — exposes the full config array (used by `--list`) - `cli/README.md` — documents the new command - `tests/cli/UserConfigOptionsParserTest.php` — PHPUnit tests for the options parser, following the existing `CliOptionsParserTest` pattern (shared `cli-parser-test.php` helper) ### Test plan - `make test-all` passes - Tested manually against a local FreshRSS instance: `--list`, `--key` (get), `--set` (bool/int/string inference), `--value-stdin`, `--unset`, `--force`, error paths (unknown key without `--force`, wrong type) * unserialize allowed_classes --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Libraries
SimplePie
FreshRSS uses a forked version of SimplePie, with a number of patches.
See the read-me of our fork.
Updating libraries
Some of the libraries in this folder can be updated semi-automatically by invoking:
cd ./FreshRSS/lib/
composer update --no-autoloader
Remember to read the change-logs, proof-read the changes, preserve possible local patches, add irrelevant files to .gitignore (minimal installation), and test before committing.