aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz
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-07-29Strong type array parameter helper (#6661)Gravatar Alexandre Alapetite
Also useful for extensions (including one I am writing)
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-05Add core extensions: UserCSS, UserJS (#6267)Gravatar hkcomori
* Copy CustomCSS and CustomJS Original: FreshRSS/Extensions@9f21984 * Rename CustomCSS -> UserCSS * Rename CustomJS -> UserJS * Change metadata The name is used for the directory where the configuration is stored and should not contain spaces. Since the name was changed, I reset the version number and changed to semantic versioning. * Change data directory Changed the location of the configuration file to the user data directory, because it is not `static`. That way, the user's configurations are gathered in the user directory, which makes it easier to backup them. * Edit documentations Remove procedures to install the extension because it is no longer necessary. * Fix wrong variables in the configuration page Remove permission error indication because the storage location is now in the user data directory managed by the application. * Remove the `xExtension-` prefix for core extensions * Set version to 1.0.0 for UserCSS, UserJS * Refactoring * Remove unused variables * Remove version 0.0.1 in Changelog Version 0.0.1 will not be merged, so only version 1.0.0 will remain. * public getFileUrl * Revert more protected * Use entrypoint for extension user path instead of name * Add space to extension name * Add `#[\Override]` * Add explains of User CSS and User JS to docs * Remove README of User CSS and User JS * Add migration code for extension user path --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-05-15PHPStan 1.11 + minor update dev dependencies (#6459)Gravatar Alexandre Alapetite
* PHPStan 1.11 + minor update dev dependencies https://github.com/phpstan/phpstan/releases/tag/1.11.0 * Comment style
2024-05-13Auto-update 5038 (#6279)Gravatar Alexandre Alapetite
* Auto-update 5038 https://github.com/FreshRSS/FreshRSS/pull/5038 * PostgreSQL * Draft for MySQL * More draft MySQL * Finalise * A bit more robust
2024-04-21Windows: release SQLite (#6285)Gravatar Alexandre Alapetite
* Windows: release SQLite fix https://github.com/FreshRSS/FreshRSS/issues/6275 * Do not use sharedPdo for deleting user * Case of same user * Help PHPStan
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-03-31Unicode preg_split new line (#6247)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/6236 https://php.net/reference.pcre.pattern.modifiers
2024-03-30Add a way to modify CSP rules within an extension (#6246)Gravatar Alexis Degrugillier
This will allow to change CSP rules to authorize the use of external scripts. We might need to add some safeguard since it will be virtually possible to load any script even malicious one.
2024-03-01Minz remove use of deprecated variable (#6132)Gravatar Alexandre Alapetite
and related improvements to clarify inheritance Follow-up of https://github.com/FreshRSS/FreshRSS/pull/6130
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-15PHPStan prepare exceptions (#6037)Gravatar Alexandre Alapetite
Take advantage of https://phpstan.org/blog/bring-your-exceptions-under-control Minimum changes to pass `tooWideThrowType` and `implicitThrows`. Revert some mistakes from: https://github.com/FreshRSS/FreshRSS/pull/5504 Preparation needed before new PRs of the same type: https://github.com/FreshRSS/FreshRSS/pull/5962 Fix several wrong PHPDocs and catches: > Method ... has ...Exception in PHPDoc @throws tag but it's not thrown. > Dead catch - ...Exception is never thrown in the try block.
2023-12-26Fix extensions enableByList (#5979)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/5976 fix https://github.com/YunoHost-Apps/freshrss_ynh/pull/176
2023-12-23Fix extensions getUserConfigurationGravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/5970 Regression from https://github.com/FreshRSS/FreshRSS/pull/5957
2023-12-22Typed Minz_Extension (#5957)Gravatar Alexandre Alapetite
Replaces https://github.com/FreshRSS/FreshRSS/pull/5837 The signature of methods supposed to be overriden by existing thid-party extensions cannot be modified
2023-12-22Fix notifications (#5959)Gravatar Alexandre Alapetite
The notification about wrong login was not working. Noticed while working on https://github.com/FreshRSS/FreshRSS/pull/5955 This was due to timing of when the notification is retrieved. Simplified code to make the logic easier and more robust.
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-03Better debug SQL error (#5916)Gravatar Alexandre Alapetite
* Better debug SQL error * Fix check
2023-11-24Fix types for extensions (#5901)Gravatar Alexandre Alapetite
* Fix types for extensions To accompany https://github.com/FreshRSS/Extensions/pull/185 * Avoid bug redeclared function
2023-11-17Fix Minz_Extension::getVersion (#5891)Gravatar Alexandre Alapetite
Regression from https://github.com/FreshRSS/FreshRSS/pull/5830
2023-11-17Fix Minz_Session::param visibility (#5889)Gravatar Alexandre Alapetite
Regression from https://github.com/FreshRSS/FreshRSS/pull/5830
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-31Fix lang_name (#5798)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/5797
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-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-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-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-05-30phpstan-8 typehinting (#5429)Gravatar Luc SANCHEZ
Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
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-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-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-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-19PHPStan Level 7 Minz_ActionController and lib_date (#5313)Gravatar Alexandre Alapetite
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-08PHPStan Level 6 for more files (#5275)Gravatar Alexandre Alapetite
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4112