Commit Graph

180 Commits

Author SHA1 Message Date
wn_ 8727fb3ba8 Clean up some unused variables.
This is essentially 1ccc0c8c1a without the renames and some other things related to Psalm.
2024-01-08 22:46:13 +00:00
Andrew Dolgov 855695a862
add stuff necessary to run integration tests using phpunit 2023-10-28 18:45:09 +03:00
Andrew Dolgov 03e956132d
switch to html2text() instead of strip_tags() when preparing FTS index 2023-10-21 10:51:24 +03:00
Andrew Dolgov d4be821825
UserHelper, CLI: add a method to check user password 2022-06-10 22:16:48 +03:00
Andrew Dolgov 65f341fbf4
CLI: properly deal with --force-yes on schema update 2022-06-10 16:16:12 +03:00
Andrew Dolgov 25b71b90b2
CLI: exit with error status when operation has failed 2022-06-10 15:39:02 +03:00
Andrew Dolgov cf1eaeedf3
* add UserHelper methods to manipulate user database (add, modify, delete)
* expose said methods via CLI (update.php)
 * fix several invocations of deprecated functions
 * set stricter type hints on several method arguments
2022-06-10 13:39:00 +03:00
Andrew Dolgov 9a5c21630b update.php: better error reporting if invoked with PHP SAPI other than CLI 2022-02-20 16:35:32 +03:00
Andrew Dolgov c3ffa08807 deal with phpstan warnings in update.php 2021-11-14 16:15:31 +03:00
wn_ 734be4ebd1 Minor PHPStand warning fix in 'update.php'. 2021-11-12 04:51:35 +00:00
wn_ 3f8aaffd34 Address PHPStan warnings in 'classes/rssutils.php'.
This also includes a minor tweak in 'update.php' to account for 'getopt()' potentially returning false (indicating failure).
2021-11-11 18:53:52 +00:00
wn_ 4cc3374f9f Initial go at PHPStan rule level 6. 2021-11-10 21:38:25 +00:00
wn_ 57436ee0c1 Address PHPStan warning in 'update.php'.
------ --------------------------------------
Line   update.php
------ --------------------------------------
213    While loop condition is always true.
------ --------------------------------------
2021-11-01 21:10:27 +00:00
Andrew Dolgov a936e80630 OPML improvements/fixes:
* allow CLI import of OPML files (--opml-import)
 * visualize OPML structure when importing
 * add strict type hints to most OPML class methods
2021-10-15 10:06:00 +03:00
Andrew Dolgov c6f5902cbc fix wrongly renamed CLI options --debug-force-... to --force-... 2021-10-11 12:18:46 +03:00
wn_ cf0ec06b8c Use ORM in some more parts of 'update.php'. 2021-08-15 21:48:50 +00:00
Andrew Dolgov 74391ec30a reorganize update.php a bit, remove unneeded options 2021-03-09 14:45:35 +03:00
Andrew Dolgov 270f0c3132 general cleanup, set some type hints 2021-03-06 15:19:31 +03:00
Andrew Dolgov 5eb0f3d640 bring back web dbupdate using new migrations system 2021-03-04 09:22:24 +03:00
Andrew Dolgov c0fb0a5ec0 wip for db_migrations for core schema 2021-03-04 08:30:52 +03:00
Andrew Dolgov d6629ed188 move dbupdater to db/updater; move base SCHEMA_VERSION constant inside db/updater class 2021-03-02 15:03:01 +03:00
Andrew Dolgov 7ef72fe0dc move startup checks to Config, set a bunch of @deprecated annotations 2021-03-01 10:20:21 +03:00
Andrew Dolgov b05d4e3d9f speed up plugin updating a bit, fix some phpstan warnings 2021-02-28 21:50:05 +03:00
Andrew Dolgov a1ca62af50 cache schema version better 2021-02-25 21:42:05 +03:00
Andrew Dolgov dcf0135285 logger: shorter syntax 2021-02-25 15:49:30 +03:00
Andrew Dolgov 29ada58b4a move db-prefs shortcut functions to functions.php 2021-02-22 23:25:14 +03:00
Andrew Dolgov 12bcf826e4 don't include config.php everywhere 2021-02-22 22:39:20 +03:00
Andrew Dolgov 211f699aa0 migrate the rest into Config:: 2021-02-22 22:35:27 +03:00
Andrew Dolgov e4107ac952 wip: initial for config object 2021-02-22 21:47:48 +03:00
Andrew Dolgov 42173386b3 dirname(__FILE__) -> __DIR__ 2021-02-22 17:38:46 +03:00
Andrew Dolgov be4e7b1340 fix several issues reported by phpstan 2021-02-22 14:41:09 +03:00
Andrew Dolgov 9f55454f63 remove the rest of db.php; rename some leftover methods in feeds 2021-02-15 16:51:35 +03:00
Andrew Dolgov 6426ae559a dbupdater: unify naming 2021-02-15 16:14:00 +03:00
Andrew Dolgov 09e9f34bb4 add UserHelper::find_user_by_login() and rewrite some user checks to invoke it instead of going through PDO 2021-02-11 10:22:27 +03:00
Andrew Dolgov 7af8744c85 authentication: make logins case-insensitive (force lowercase) 2021-02-11 09:57:57 +03:00
Andrew Dolgov 1eb1629d9e pluginhost: rework run_hooks() to be shorter, add callback variant; implement exception handling for both 2021-02-08 14:24:45 +03:00
Andrew Dolgov 942afb43a1 sanity checks: use better CLI detection, shorten most of the text 2021-02-08 08:49:21 +03:00
Andrew Dolgov 403dca154c initial WIP for php8; bump php version requirement to 7.0 2021-02-05 23:41:32 +03:00
Andrew Dolgov 2abc434e26 daemon: clarify some task-related messages 2020-12-31 10:11:41 +03:00
wn 358bcdd881 Fix passing options to plugins in 'update.php'. 2020-12-12 10:28:43 -06:00
Andrew Dolgov 476be67ff9 updater: set --update-schema as optional-value 2020-09-30 06:56:31 +03:00
Andrew Dolgov 82bc740363 Logger::log - allow specifying errno
bump severity of PDO exception log messages to E_USER_WARNING
2020-09-29 10:08:54 +03:00
Andrew Dolgov 97d7e5a42a allow updating database schema in batch mode 2020-09-28 13:51:47 +03:00
Andrew Dolgov d4d0e976dc update-feed: exit with non-zero exit code if update_rss_feed() failed
daemon: log if per-feed update task terminated with non-zero exit code
2020-09-27 16:42:45 +03:00
Andrew Dolgov 528b387563 update individual feed in a separate process to prevent PHP fatal errors
(for example, OOM) from stopping the entire batch
this should also slightly increase memory budget for update processes
2020-09-27 15:58:13 +03:00
Andrew Dolgov 74568df4ff remove a lot of stuff from global context (functions.php), add a few helper classes instead 2020-09-22 09:04:33 +03:00
Andrew Dolgov 7a2e9bef77 add --opml-export to update.php 2020-05-13 12:07:31 +03:00
Andrew Dolgov 088fcf8131 move more globals to more appropriate places
set libxml to always use internal errors
2019-06-20 08:40:02 +03:00
Andrew Dolgov 3bd3324e5a update: add option to send digests 2019-03-21 07:44:39 +03:00
Andrew Dolgov a1f8322871 further update CLI schema updater layout to make it more readable 2019-03-07 06:54:05 +03:00