aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2023-10-27Fix extensions i18en English fallback (#5752)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/5734 fix https://github.com/FreshRSS/FreshRSS/issues/5724 Regression from https://github.com/FreshRSS/FreshRSS/pull/5426
2023-10-11fix(minz): fix malformed HTTP header (#5699)Gravatar NaeiKinDus
2023-10-08Minor update dependencies (#5693)Gravatar Alexandre Alapetite
* Minor update dependencies Follow-up of https://github.com/FreshRSS/FreshRSS/pull/5691 Mostly dev dependencies; nothing that affects our runtime * Update versions for GitHub Actions * Fix newly found typos * Fix exclude path
2023-09-13Allow configuration of Base URL via website (#5656)Gravatar Sam Cohen
* Allow configuration of Base URL via website * Fix alphabetization of CREDITS * Apply suggestions from code review * Add Automatic recommendation --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-09-04Fix JSON export/import (#5626)Gravatar Alexandre Alapetite
* Fix import with empty content fix https://github.com/FreshRSS/FreshRSS/issues/5622 Cherry picks on https://github.com/FreshRSS/FreshRSS/pull/5584 * Fix export of tags / labels Article-defined tags were wrongly exported as user-defined labels. * Fix export of tags / labels Article-defined tags were wrongly exported as user-defined labels. * Fix bug with many labels * Better typing * Comments
2023-07-30Rework trusted proxies (#5549)Gravatar Alexandre Alapetite
* Rework trusted proxies Fix https://github.com/FreshRSS/FreshRSS/issues/5502 Follow-up of https://github.com/FreshRSS/FreshRSS/pull/3226 New environment variable `TRUSTED_PROXY`: set to 0 to disable, or to a list of trusted IP ranges compatible with https://httpd.apache.org/docs/current/mod/mod_remoteip.html#remoteiptrustedproxy New internal environment variable `CONN_REMOTE_ADDR` to remember the true IP address of the connection (e.g. last proxy), even when using mod_remoteip. Current working setups should not observe any significant change. * Minor whitespace * Safer trusted sources during install Rework of https://github.com/FreshRSS/FreshRSS/pull/5358 https://github.com/FreshRSS/FreshRSS/issues/5357 * Minor readme
2023-07-07fix many "Only booleans are allowed in an if condition" (#5501)Gravatar Luc SANCHEZ
* fix many "Only booleans are allowed in an if condition" * Update cli/create-user.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update cli/i18n/I18nUsageValidator.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Fix several regressions and other minor things * Fix another regression * Update lib/http-conditional.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-07-05New extension hook entry_auto_read (#5505)Gravatar Alexandre Alapetite
* New extension hook entry_auto_read For extensions to be notified of articles being automatically marked as read for various reasons * Documentation + entry_auto_unread
2023-06-15Fix slider views (#5469)Gravatar Alexandre Alapetite
* Fix slider titles And fix full-page view of category configuration. FIx https://github.com/FreshRSS/FreshRSS/pull/5449#issuecomment-1590021947 * Fix user queries and user management Implement https://github.com/FreshRSS/FreshRSS/pull/5469#issuecomment-1591957935
2023-06-12Remove core extensions Google Groups and Tumblr (#5457)Gravatar Alexandre Alapetite
* Remove core extensions Google Groups and Tumblr * Google Groups seems to have remove support for RSS/ATOM https://github.com/FreshRSS/FreshRSS/pull/2838 (see e.g. https://www.theregister.com/2021/08/16/google_groups_rss/ ) * Tumblr seems to have fixed their RSS/ATOM post-GDPR https://github.com/FreshRSS/FreshRSS/pull/1924 So for both of thems, the extensions have become irrelevant. * Cleaning
2023-05-30phpstan-8 typehinting (#5429)Gravatar Luc SANCHEZ
Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
2023-05-28Improve Dev Container (#5423)Gravatar Alexandre Alapetite
* Improve Dev Container PHPStan was failing in Dev Container * Update Docker to Alpine Linux 3.18 * New DATA_PATH environment variable * README
2023-05-28Fixed: i18n extensions: 'en' as fallback (#5426)Gravatar maTh
* Update Translate.php * Small improvements --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-05-25Fix favicon fetching while using proxies (#5421)Gravatar vrachnis
* Fix favicon fetching while using proxies This ensures that if curl_options are defined in config.php, those settings are respected while fetching favicons. Fixes FreshRSS#4951 * Change options priority * Credits keep alphabticorder --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-05-22PHPStan Level 7 complete (#5406)Gravatar Alexandre Alapetite
* PHPStan Level 7 complete * Start PHPStan Level 8 * Forgot exclude .phtml
2023-05-15PHPStan Level 7 for Minz_Request, FreshRSS_Feed, Minz_Error (#5400)Gravatar Alexandre Alapetite
* PHPStan Level 7 for Minz_Request * PHPStan Level 7 for FreshRSS_Feed * PHPStan Level 7 for Minz_Error
2023-05-15Fix logs pagination (#5403)Gravatar Alexandre Alapetite
* Fix logs pagination Regression from https://github.com/FreshRSS/FreshRSS/pull/5269 * Add better default
2023-05-13PHPStan Level 7 for Share userController logs_pagination (#5393)Gravatar Alexandre Alapetite
2023-05-12Link configuration to proper parameter (#5394)Gravatar Alexis Degrugillier
Before, the system configuration was linked to the user parameter while the user configuration was linked to the system parameter. This was an issue when trying to retrieve some kind of configuration value in an extension. Now, the configurations are properly linked to their parameters.
2023-05-11PHPMailer 6.8.0 (#5389)Gravatar Alexandre Alapetite
* PHPMailer 6.8.0 https://github.com/PHPMailer/PHPMailer/releases/tag/v6.8.0 https://github.com/PHPMailer/PHPMailer/releases * Exclude unused DSNConfigurator
2023-05-11A few additional PHPStan rules (#5388)Gravatar Alexandre Alapetite
A subset of https://github.com/phpstan/phpstan-strict-rules
2023-05-11Typed view model classes (#5380)Gravatar Alexandre Alapetite
* Typed view model classes * Add ability to provide a typed view model class to a controller * Use `::class` instead of string for referring to classes * Examplified with `stats` and `javascript` controllers / views (more to do) * Also useful for extensions (my usecase today), which did not have the ability to define own view model attributes before. * Typo
2023-05-07docs: language table added (#5375)Gravatar maTh
* docs: language table added * Update 05_Configuration.md * Update 05_Configuration.md * french docs * Unicode quote and a few fixes (Same search&replace aslo applied to a few other files) --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-05-04Use PHPStan dynamicConstantNames (#5370)Gravatar Alexandre Alapetite
https://phpstan.org/config-reference#constants Avoid a few phpstan-ignore-next-line
2023-05-03Automatic trusted_sources during install (#5358)Gravatar Alexandre Alapetite
* Automatic trusted_sources during install Fix https://github.com/FreshRSS/FreshRSS/issues/5357 * Fix install for http_auth * Update lib/lib_rss.php Co-authored-by: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> * Fill null exception e-mail * Revert some syntax * Minor parentheses
2023-04-28PHPStan Level 7 for more DAO PDO (#5328)Gravatar Alexandre Alapetite
* PHPStan Level 7 for more DAO PDO With new function to address common type and check problems * A bit more * PHPStan Level 7 for FreshRSS_Entry
2023-04-20Better XPath failure (#5317)Gravatar Alexandre Alapetite
Report feeds as errored for more cases
2023-04-20PHPStan 7 configureController (#5318)Gravatar Alexandre Alapetite
And fix bugs for saving user queries
2023-04-19PHPStan Level 7 Minz_ActionController and lib_date (#5313)Gravatar Alexandre Alapetite
2023-04-17Fix safe_ascii (#5311)Gravatar Alexandre Alapetite
Fix https://github.com/FreshRSS/FreshRSS/issues/5310
2023-04-17Complete PHPStan Level 6 (#5305)Gravatar Alexandre Alapetite
* Complete PHPStan Level 6 Fix https://github.com/FreshRSS/FreshRSS/issues/4112 And initiate PHPStan Level 7 * PHPStan Level 6 for tests * Use phpstan/phpstan-phpunit * Update to PHPStan version 1.10 * Fix mixed bug * Fix mixed return bug * Fix paginator bug * Fix FreshRSS_UserConfiguration * A couple more Minz_Configuration bug fixes * A few trivial PHPStan Level 7 fixes * A few more simple PHPStan Level 7 * More files passing PHPStan Level 7 Add interface to replace removed class from https://github.com/FreshRSS/FreshRSS/pull/5251 * A few more PHPStan Level 7 preparations * A few last details
2023-04-14PHPStan Level 6 FreshRSS_Search FreshRSS_Entry (#5292)Gravatar Alexandre Alapetite
* PHPStan Level 6 FreshRSS_Search FreshRSS_Entry * Minor fix * Type fix * Apply suggestions from code review Co-authored-by: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> * Minor types syntax Compatibility Intelephense --------- Co-authored-by: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com>
2023-04-12PHPstan level 6 for Dispatcher.php (#5290)Gravatar Luc SANCHEZ
* PHPstan level 6 for Dispatcher.php * PHPstan level 6 for Dispatcher.php * Minor fixes --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-04-11PHPstan level 6 for Migrator.php (#5283)Gravatar Luc SANCHEZ
* PHPstan level 5 for Migrator.php * PHPstan level 5 for Migrator.php * Update lib/Minz/Migrator.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update lib/Minz/Migrator.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update lib/Minz/Migrator.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update lib/Minz/Migrator.php * Update lib/Minz/Migrator.php * Fix type --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-04-10PHPStan for Minz_Session class (#5282)Gravatar Luc SANCHEZ
* PHPstan level 8 for Session.php * PHPstan level 8 for Session.php * PHPstan level 8 for Session.php * Update lib/Minz/Session.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-04-10PHPStan 9 for lib/http-conditional.php (#5277)Gravatar Alexandre Alapetite
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4112
2023-04-08PHPStan Level 6 for more files (#5275)Gravatar Alexandre Alapetite
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4112
2023-04-07Fix login (#5271)Gravatar Alexandre Alapetite
Fix https://github.com/FreshRSS/FreshRSS/issues/5270
2023-04-07Remove ConfigurationSetter (#5251)Gravatar Alexandre Alapetite
This class has not been maintained for a while. Only a subset of our configuration properties are there, and some code is not relevant anymore. Furthermore, it is relying exclusively on dynamically invoked functions, making it challenging to maintain, in particular to find out what is used and what is not, what is handled and what is not. It is not well suited for changes in data formats, which have been handled in the Context class instead. It is also not able to handle configuration properties that are missing. It is the class with most errors for PHPStan level 6 (179 errors). It is also making intense use of is_callable and call_user_func_array, which are performance killers. Should the need arrise again to perform validation of our internal configuration files, I suggest an implementation with the opposite approach, namely driven by our code instead of driven by the data. In summary, at the moment, this class is costly, while not offering many guarantees.
2023-04-07Phpstan Level6 for View.php (#5269)Gravatar Luc SANCHEZ
* Remarque's from Alkarex * indentation * indentation * Apply suggestions from code review Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Remarque's from Alkarex * A few improvements * Remarque's from Alkarex * Remarque's from Alkarex * Remarque's from Alkarex * Remarque's from Alkarex * Fixes and improvments * Fix getTagsForEntry --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-04-07Use typed access to request parameters (#5267)Gravatar Alexandre Alapetite
* Use typed access to request parameters This was a big source of mixed datatypes in many places * Fix notifications * Fix bookmarkAction
2023-04-05PHPStan level 6 for more files (#5264)Gravatar Alexandre Alapetite
7 more files passing (see phpstan-next.txt)
2023-04-05Fix phpstan level 9 error for f.php and lib/favicons.php (#5263)Gravatar Luc SANCHEZ
* Fix phpstan level 9 error * Fix phpstan level 9 error * Remarque's from Alkarex --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
2023-04-04Fix extensions in actualize_script (#5243)Gravatar Alexandre Alapetite
* Fix extension freshrss_user_maintenance in actualize_script Follow-up of https://github.com/FreshRSS/FreshRSS/pull/3440 The hook was called before registering all the extensions for the current user * PHPStan Level 6 for extensions And remove 5-year old legacy format of enabled extensions < FreshRSS 1.11.1 * Fix multiple bugs in extensions * Minor typing * Don't change signature of methods supposed to be overridden * PHPStan Level 9 and compatibility Intelliphense * Set as final the methods not supposed to be overriden
2023-03-31PHPStan level 6 for all PDO and Exception classes (#5239)Gravatar Alexandre Alapetite
* PHPStan level 6 for all PDO and Exception classes Contributes to https://github.com/FreshRSS/FreshRSS/issues/4112 * Fix type * Now also our remaining own librairies * Motivation for a few more files * A few more DAO classes * Last interface
2023-03-29Simplify extension method (#5234)Gravatar Alexandre Alapetite
One parameter was not used Furthermore, that unused parameter was preventing simpler calls (i.e. without a dedicated extension class). Now it is possible to register a call back with a lamda: ```php Minz_ExtensionManager::addHook('feed_before_actualize', function () { // Hello }); ```
2023-03-27Add test and type hinting (#5087)Gravatar Luc SANCHEZ
* - Add test and type hinting - pass PhpStan Level 9 * fix dump * fix style * fix visibility * fix style * add test * add test * add test * add test * add test * Simplify * cleaning after test * remove space * fix style * use specific log file for test * Remarque's from Alkarex * A few more details --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-03-26Modernize Constants and use new constant for string 'currentUser' (#5089)Gravatar Luc SANCHEZ
* Modernize Constants and use new constant 'currentUser' * Add FreshRSS_Context::currentUser() function and use * Add FreshRSS_Context::currentUser() function and use * Add FreshRSS_Context::currentUser() function and use * Add FreshRSS_Context::currentUser() function and use * Add FreshRSS_Context::currentUser() function and use * Update app/Controllers/userController.php * Update app/Controllers/userController.php * Update app/Controllers/userController.php * Update app/Models/Auth.php * Update p/api/greader.php * Update p/api/greader.php * Update p/api/greader.php * Update app/Models/Context.php * Update app/Models/LogDAO.php * Update lib/Minz/Log.php * Update p/api/greader.php * Update app/layout/header.phtml * Update app/views/helpers/export/articles.phtml * Update cli/do-install.php * Remarque's from Alkarex * Remarque's from Alkarex * Refactor using new Minz_User class * Consistent naming of public constants --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-03-13Merge SimplePie 747 (#5199)Gravatar Alexandre Alapetite
* Merge SimplePie 747 #fix https://github.com/FreshRSS/FreshRSS/issues/5195 Upstream https://github.com/simplepie/simplepie/pull/747 * Syntax error
2023-03-10Update lib_opml to v0.5.1 (#5188)Gravatar berumuron