aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2024-08-01Minor update whitespace PHPCS rules (#6666)Gravatar Alexandre Alapetite
* Minor update whitespace PHPCS rules To simplify our configuration, apply more rules, and be clearer about what is added or removed compared with PSR12. Does not change our current conventions, but just a bit more consistent. * Forgotten *.phtml * Sort exclusion patterns + add a few for Extensions repo * Relaxed some rules
2024-08-01Fix parentheses for complex `OR` boolean search expressions (#6672)Gravatar Alexandre Alapetite
* Fix OR parentheses * Pass all tests * Forgotten comment * Minor whitespace * Fix several cases envolving negation * Line length * Fix `OR NOT`
2024-07-09Initial support for PHP 8.4 (#6615)Gravatar Alexandre Alapetite
* Initial support for PHP 8.4 Sole fix needed so far seems to be related to https://wiki.php.net/rfc/deprecate-implicitly-nullable-types See also upstream PR https://github.com/PhpGt/CssXPath/pull/227 We are also hitting was seems to be a PHP bug https://github.com/php/php-src/issues/14873 * Fix return type * Disable OPCache while waiting for PHP fix
2024-06-09Pass PHPStan level 9 (#6544)Gravatar Alexandre Alapetite
* More PHPStan * More, passing * 4 more files * Update to PHPStan 1.11.4 Needed for fixed bug: Consider numeric-string types after string concat https://github.com/phpstan/phpstan/releases/tag/1.11.4 * Pass PHPStan level 9 Start tracking booleansInConditions * Fix mark as read * Fix doctype * ctype_digit
2024-06-05Modernize code to php7.4 (#6043)Gravatar Luc SANCHEZ
* Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Modernize code to php7.4 * Consistency --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-04-18i18n improved: dotted path -> dot-notation (#6317)Gravatar maTh
* dotted path -> dot-notation * dot-notation -> dot notation * rename json_dotpath => json_dotnotation * Update app/i18n/fr/sub.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update app/i18n/fr/sub.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update app/i18n/fr/sub.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update app/i18n/nl/sub.php Co-authored-by: Frans de Jonge <fransdejonge@gmail.com> * Update app/i18n/nl/sub.php Co-authored-by: Frans de Jonge <fransdejonge@gmail.com> * Update app/i18n/nl/sub.php Co-authored-by: Frans de Jonge <fransdejonge@gmail.com> * Update app/i18n/nl/sub.php Co-authored-by: Frans de Jonge <fransdejonge@gmail.com> * Rename corresponding class --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2024-04-10PHP 8.3 #[\Override] (#6273)Gravatar Alexandre Alapetite
* PHP 8.3 #[\Override] https://php.watch/versions/8.3/override-attr With PHPStan `checkMissingOverrideMethodAttribute` https://phpstan.org/config-reference#checkmissingoverridemethodattribute And modified the call to phpstan-next on the model of https://github.com/FreshRSS/Extensions/pull/228 (more robust than the find method, which gave some strange errors) * Update extension example accordingly
2024-02-28Command Line Parser Concept (#6099)Gravatar Kasimir Cash
* Adds logic for validation * Adds validation to do-install * Adds help to do-install * Adds validation & help to reconfigure * Adds validation to check.translation * Adds validation to manipulate.translation * Small fixes to help texts * Refactors language option validation * Adds default options to validation * Fixes validation with regex * Refactors readAs functions * Updates to new regex validation format * Fixes typing around default values * Adds file extension validation * Restandardises validation & parsing typing around array of strings * Adds NotOneOf validation * Adds ArrayOfString read as * Refactors existing validation * Adds validation throughout cli * Removes unused file * Adds new CL parser with goal of wrapping CLI behaviour * Hides parsing and validation * Rewites CL parser to make better use of classes * Rolls out new parser across CL * Fixes error during unknown option check * Fixes misnamed property calls * Seperates validations into more appropriate locations * Adds common boolean forms to validation * Moves CommandLineParser and Option classes into their own files * Fixes error when validating Int type * Rewrites appendTypedValues -> appendTypedValidValues now filters invalid values from output * Renames -> for clarity * Adds some docs clarifying option defaults and value taking behaviour * Refactors getUsageMessage for readability * Minor formatting changes * Adds tests for CommandLineParser * Adds more tests * Adds minor fixs * Reconfigure now correctly updates config * More fixes to reconfigure * Fixes required files for CommandLineParserTest * Use .php extension for PHP file * PHPStan ignore instead of wrong typing * Refactors to support php 7.4 * Moves away from dynamic properties by adding 'Definintions' to all commands * Renames target to definition for clarity * Stops null from being returned as a valid value in a certain edge case * Adds PHPStan ignore instead of incorrect typing * Refactors tests to take account of new typing solution * Marks file as executable * Draft CLI rework * Finish rewrite as object-oriented * Fix PHPStan ignore and make more strongly typed * Rename class Option to CliOption * Light renaming + anonymous classes --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-02-26New feature: shareable user query (#6052)Gravatar Alexandre Alapetite
* New feature: shareable user query Share the output of a user query by RSS / HTML / OPML with other people through unique URLs. Replaces the global admin token, which was the only option (but unsafe) to share RSS outputs with other people. Also add a new HTML output for people without an RSS reader. fix https://github.com/FreshRSS/FreshRSS/issues/3066#issuecomment-648977890 fix https://github.com/FreshRSS/FreshRSS/issues/3178#issuecomment-769435504 * Remove unused method * Fix token saving * Implement HTML view * Update i18n for master token * Revert i18n get_favorite * Fix missing i18n for user queries from before this PR * Remove irrelevant tests * Add link to RSS version * Fix getGet * Fix getState * Fix getSearch * Alternative getSearch * Default getOrder * Explicit default state * Fix test * Add OPML sharing * Remove many redundant SQL queries from original implementation of user queries * Fix article tags * Use default user settings * Prepare public search * Fixes * Allow user search on article tags * Implement user search * Revert filter bug * Revert wrong SQL left outer join change * Implement checkboxes * Safe check of OPML * Fix label * Remove RSS button to favour new sharing method That sharing button was using a global admin token * First version of HTTP 304 * Disallow some recusrivity fix https://github.com/FreshRSS/FreshRSS/issues/6086 * Draft of nav * Minor httpConditional * Add support for offset for pagination * Fix offset pagination * Fix explicit order ASC * Add documentation * Help links i18n * Note about deprecated master token * Typo * Doc about format
2024-01-17Fixes reversed behaviour by ignore (#6041)Gravatar Kasimir Cash
2024-01-13Fix PHP 7.4 compatibility (#6038)Gravatar Alexandre Alapetite
Some recent PRs have broken PHP 7.4 compatibility due to `mixed` typing.
2024-01-10JSONFeeds, JSON scraping, and POST requests for feeds (#5662)Gravatar eta-orionis
* allow POST requests for feeds * added json dotpath and jsonfeed subscriptions. No translation strings yet * debug and fix jsonfeed parser * bugfix params saved when editing feed * added translations for JSON features * Update docs for web scraping * make fix-all and revert unrelated changes, plus a few manual fixes, but there are still several type errors * Fix some i18n * refactor json parsing for both feed types * cleanup unnecessary comment * refactored generation of SimplePie for XPath and JSON feeds * Fix merge error * Update to newer FreshRSS code * A bit of refactoring * doc, whitespace * JSON Feed is in two words * Add support for array syntax * Whitespace * Add OPML export/import * Work on i18n * Accept application/feed+json * Rework POST * Fix update * OPML for cURL options * Fix types * Fix Typos --------- Co-authored-by: Erion Elmasllari <elmasllari@factorsixty.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-12-18Pass PHPStan level 8 (#5946)Gravatar Alexandre Alapetite
* Pass PHPStan level 8 And prepare for PHPStan level 9 https://phpstan.org/user-guide/rule-levels * Revert wrong replace in comment * Fix PHPStan level 8 * Update PHPStan and other dev dependencies * Remove obsolete comment * noVariableVariables and towards bleedingEdge https://github.com/phpstan/phpstan-strict-rules https://phpstan.org/blog/what-is-bleeding-edge * More bleedingEdge * A bit more PHPStan level 9 * More PHPStan level 9 * Prepare for booleansInConditions Ignore int and null * Revert wrong line * More fixes * Fix keep_max_n_unread * Stricter attribute functions * Stricter callHooks and more PHPStan level 9 * More typing * A tiny more
2023-12-15Add filter actions (auto mark read) at category and global levels (#5942)Gravatar Alexandre Alapetite
* Add filter actions (auto mark read) at category level fix https://github.com/FreshRSS/FreshRSS/issues/3497 * Add filter actions (auto mark read) at global level fix https://github.com/FreshRSS/FreshRSS/issues/2788 * Fix feed category ID * Minor comment
2023-11-16Use strict_types (#5830)Gravatar Luc SANCHEZ
* Little's optimisations and booleans in conditions * Apply strict type * Apply strict type * Apply strict type * Fix multiple bugs with PHP 8.2 and 8.3 * Many declares missing, more errors fixed * Apply strict type * Another approach * Stronger typing for Minz_Session * Fix case of SQLite --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-10-30SQL increase length of VARCHAR fields (#5756)Gravatar Alexandre Alapetite
* SQL increase length of VARCHAR fields Increase length of all fields, keeping the limits for: * Unique indexes on UTF-8: 191 bytes for MySQL; * Unique indexes on ASCII: 767 bytes for MySQL; * Max URL for external tools: 32768 characters; * Max VARCHAR: 65535 bytes for MySQL; Follow-up of https://github.com/FreshRSS/FreshRSS/pull/5038 Fix https://github.com/FreshRSS/FreshRSS/issues/4986 * Fix length test
2023-10-30Require PHP 7.4+ (#5720)Gravatar Alexandre Alapetite
* Require PHP 7.4+ https://github.com/FreshRSS/FreshRSS/discussions/5474 * Update Docker oldest Alpine 3.13 with PHP 7.4.26 * Add missing packets to Docker oldest * Update to typed properties https://php.net/migration74.new-features#migration74.new-features.core.typed-properties * More types
2023-10-23Changelog 1.22 (#5717)Gravatar Alexandre Alapetite
* Changelog 1.22 * Until page 9 * A bit more * Add last changes * Finalise * More credits
2023-09-26Fix search using user queries (#5669)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/5668
2023-09-05Fix parenthesis escaping bug (#5633)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/5632 In the SQL search, parentheses should not be escaped. Escaped parenthesis in the SQL search were tolerated by PostgreSQL but not by SQLite.
2023-06-08phpstan-8 for category class (#5434)Gravatar Luc SANCHEZ
* phpstan-8 for category class * Another approach to nullable https://github.com/FreshRSS/FreshRSS/pull/5434#discussion_r1210776699 --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-05-30phpstan-9 for Share.php (#5431)Gravatar Luc SANCHEZ
* phpstan 9 for Search.php phpstan 9 for Share.php * phpstan-9 for Search.php * Better consistency for search results --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-05-30phpstan-8 typehinting (#5429)Gravatar Luc SANCHEZ
Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
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-13PHPStan Level 7 for Share userController logs_pagination (#5393)Gravatar Alexandre Alapetite
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-10phpstan level 7 for indexController.php (#5384)Gravatar Luc SANCHEZ
Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
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-07phpstan level 7 for updateController.php (#5376)Gravatar Luc SANCHEZ
* phpstan level 7 for updateController.php * phpstan level 7 for updateController.php * Minor array syntax --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-05-07phpstan level 7 for feedController.php (#5373)Gravatar Luc SANCHEZ
* phpstan level 7 for feedController.php * phpstan level 7 for feedController.php * phpstan level 7 for feedController.php * phpstan level 7 for feedController.php * A few fixes --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-05-04phpstan level 7 for importExportController.php (#5361)Gravatar Luc SANCHEZ
* phpstan level 7 for importExportController.php * Update app/Controllers/importExportController.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update app/Controllers/importExportController.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update app/Controllers/importExportController.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update app/Controllers/importExportController.php Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * phpstan level 7 for importExportController.php * phpstan level 7 for importExportController.php * phpstan level 7 for importExportController.php * A few edits --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-05-02PHPStan Level 7 complete DAOs (#5354)Gravatar Alexandre Alapetite
* PHPStan Level 7 complete DAOs * Finalise PHPStan Level 7 for CategoryDAO * PHPStan Level 7 for Context and Search * Apply suggestions from code review Co-authored-by: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com>
2023-04-29phpstan level 9 for check.translation.php (#5353)Gravatar Luc SANCHEZ
* phpstan level 7 for check.translation.php * Fixes --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-04-28phpstan level 7 for manipulate.translation.php (#5352)Gravatar Luc SANCHEZ
* phpstan level 7 for manipulate.translation.php * Update manipulate.translation.php --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
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-23PHPStan Level 7 for ten more files (#5327)Gravatar Alexandre Alapetite
* PHPStan Level 7 for nine more files * Minor syntax * One more
2023-04-20PHPStan Level 7 for FreshRSS_UserQuery (#5319)Gravatar Alexandre Alapetite
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/5318
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-17phpstan level 7 for user-info.php (#5309)Gravatar Luc SANCHEZ
* phpstan level 7 for user-info.php * phpstan level 7 for user-info.php * phpstan level 7 for user-info.php --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
2023-04-17PHPstan level 7 for MigratorTest.php (#5307)Gravatar Luc SANCHEZ
Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
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-15PHPStan level 6 for remaining DAO classes (#5299)Gravatar Alexandre Alapetite
* PHPStan level 6 FreshRSS_CategoryDAO Follow-up of https://github.com/FreshRSS/FreshRSS/pull/5298 Contributes to https://github.com/FreshRSS/FreshRSS/issues/4112 * PHPStan Level 6 for FeedDAO and a bit more * PHPStan Level 6 for tagDAO
2023-04-15PHPstan level 6 for Category.php (#5298)Gravatar Luc SANCHEZ
* PHPstan level 6 for Category.php * Fix a few things * Minor fixes * A few more fixes --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-04-14PHPstan level 6 for I18nFile.php (#5291)Gravatar Luc SANCHEZ
* PHPstan level 6 for I18nFile.php * Minor syntax * PHPstan level 6 for I18nFiles * PHPstan level 6 for I18nFiles * PHPstan level 6 for I18n Files * PHPstan level 6 for I18n Files * Fix several type errors --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
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-12PHPStan Level 6 for FreshRSS_Share (#5289)Gravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/pull/5284