aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/updateController.php
AgeCommit message (Collapse)Author
2025-08-15Fix some PHP 8.5 deprecations (#7826)Gravatar Alexandre Alapetite
https://github.com/php/php-src/blob/php-8.5.0beta1/NEWS https://php.net/function.curl-close > This function has no effect. Prior to PHP 8.0.0, this function was used to close the resource.
2025-07-31Implement sudo mode / reauthentication (#7753)Gravatar Inverle
* Implement sudo mode / reauthentication * i18n: fr * generate flags * Improvements * Remove HMAC check * Don't require reauth to access logs when signed in as admin * Notify user of bad login via notification instead --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-12-27PHPStan 2.0 (#7131)Gravatar Alexandre Alapetite
* PHPStan 2.0 fix https://github.com/FreshRSS/FreshRSS/issues/6989 https://github.com/phpstan/phpstan/releases/tag/2.0.0 https://github.com/phpstan/phpstan/blob/2.0.x/UPGRADING.md * More * More * Done * fix i18n CLI * Restore a PHPStan Next test For work towards PHPStan Level 10 * 4 more on Level 10 * fix getTagsForEntry * API at Level 10 * More Level 10 * Finish Minz at Level 10 * Finish CLI at Level 10 * Finish Controllers at Level 10 * More Level 10 * More * Pass bleedingEdge * Clean PHPStan options and add TODOs * Level 10 for main config * More * Consitency array vs. list * Sanitize themes get_infos * Simplify TagDAO->getTagsForEntries() * Finish reportAnyTypeWideningInVarTag * Prepare checkBenevolentUnionTypes and checkImplicitMixed * Fixes * Refix * Another fix * Casing of __METHOD__ constant
2024-11-28Upgrade code to php 8.1 (#6748)Gravatar Luc SANCHEZ
* revert Fix code indentation Fix code Upgrade code to php 8.1 * fix remarques * code review * code review * code review * Apply suggestions from code review * code review * Fixes * Many remainging updates of array syntax * Lost case 'reading-list' * Uneeded PHPDoc --------- Co-authored-by: Luc Sanchez <l.sanchez-prestataire@alptis.fr> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2024-09-06Upgrade to PHP 8.1 (#6711)Gravatar Alexandre Alapetite
* Upgrade to PHP 8.1 As discussed in https://github.com/FreshRSS/FreshRSS/discussions/5474 https://www.php.net/releases/8.0/en.php https://www.php.net/releases/8.1/en.php Upgrade to available native type declarations https://php.net/language.types.declarations Upgrade to https://phpunit.de/announcements/phpunit-10.html which requires PHP 8.1+ (good timing, as version 9 was not maintained anymore) Upgrade `:oldest` Docker dev image to oldest Alpine version supporting PHP 8.1: Alpine 3.16, which includes PHP 8.1.22. * Include 6736 https://github.com/FreshRSS/FreshRSS/pull/6736
2024-05-29Fix update git version (#6513)Gravatar Alexandre Alapetite
fix https://github.com/FreshRSS/FreshRSS/issues/6512 Compatibility with git older than 2.37
2024-05-26Better git error messages (#6496)Gravatar Alexandre Alapetite
* Better git error messages fix https://github.com/FreshRSS/FreshRSS/discussions/5174 fix https://github.com/FreshRSS/FreshRSS/issues/6483 * Avoid dependency on `which`
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-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-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-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-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-07-07Chore/processing of depreciations and updating code to php72 minimum (#5504)Gravatar Luc SANCHEZ
* processing of depreciations and updating of code to php7.2 minimum * Autoformat many strange array indenting And revert a few unwanted changes --------- Co-authored-by: Luc <sanchezluc+freshrss@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2023-06-13Improved: update page (#5420)Gravatar maTh
* prependTitle() * do not need the "damn" in the alert * update page layout improved * release channel * i18n labels * add log messages while updating * Delete updatee.php * Update updateController.php * Update updateController.php * Update updateController.php * Update updateController.php * add getCurrentGitBranch() * Update updateController.php * state2 buttons * i18n * loading * Update feedback.php * Update feedback.php * Update feedback.php * Update extra.js * Apply suggestions from code review Co-authored-by: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> * Update updateController.php * Update terminology * update button is now armed --------- Co-authored-by: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> 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-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-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-01-09Update dev dependencies (#4993)Gravatar Alexandre Alapetite
Related to https://github.com/FreshRSS/FreshRSS/pull/4991 Required a few changes in code to pass the tests
2022-11-15Fix type hints regressions (#4855)Gravatar Alexandre Alapetite
Fix regressions from https://github.com/FreshRSS/FreshRSS/pull/4561 Example: ``` PHP Fatal error: Uncaught TypeError: Argument 1 passed to checkToken() must be an instance of FreshRSS_UserConfiguration, instance of Minz_Configuration given, called in /var/www/FreshRSS/p/api/greader.php on line 1091 and defined in /var/www/FreshRSS/p/api/greader.php:223 Stack trace: #0 /var/www/FreshRSS/p/api/greader.php(1091): checkToken() #1 {main} thrown in /var/www/FreshRSS/p/api/greader.php on line 223 ``` Improvement of https://github.com/FreshRSS/FreshRSS/pull/4110
2022-11-14NFS-friendly is_writable() checks (#4780)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/4779
2022-09-20Fix opcache bug during Web update (#4629)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/4624 #fix https://github.com/FreshRSS/FreshRSS/issues/4605
2022-06-02Fix update URL (#4399)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/4395 maybe
2022-02-04class constant (#4194)Gravatar maTh
2022-01-08Use typographic quotes (#4133)Gravatar Alexandre Alapetite
* Use typographic quotes * A few fixes * Fix * Fix not saved * Implement feedback * Detail * Revert spoken English fixes Left for a future dedicated discussion * More reverts * Final reverts * Final minor
2022-01-04PHPStan level 5 (#4110)Gravatar Alexandre Alapetite
* Fix most PHPDocs errors Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103 https://phpstan.org/writing-php-code/phpdoc-types * Avoid func_get_args Use variadic syntax instead https://php.net/manual/functions.arguments#functions.variable-arg-list And avoid dynamic functions names when possible to more easily identify calls and unused functions. Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103 * PHPStan level 3 * PHPStand level 4 * Update default to PHPStan level 4 * Towards level 5 * Fix level 4 regression * Towards level 5 * Pass PHPStan level 5 * Towards level 6 * Remove erronenous regression from changelog https://github.com/FreshRSS/FreshRSS/pull/4116
2021-12-31Add PHPStan (#4021)Gravatar Alexandre Alapetite
* Add PHPStan #fix https://github.com/FreshRSS/FreshRSS/issues/4016 https://phpstan.org/ ```sh composer run-script phpstan ``` * More fixes * Fix global variables * Add .phtml * Fix merge https://github.com/FreshRSS/FreshRSS/pull/4090 * Fix more warnings * Fix view errors and enable in CI * ReturnTypeWillChange * Dynamic view type * Fix Minz static/self bug
2021-06-07Git 2.21 compatiblity (#3669)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/3665 `git branch --show-current` requires git 2.22+ https://stackoverflow.com/questions/1417957/show-just-the-current-branch-in-git
2021-05-30Fix git update error message (#3645)Gravatar Alexandre Alapetite
#fix https://github.com/FreshRSS/FreshRSS/issues/3644
2021-05-26Minor whitespace (#3639)Gravatar Alexandre Alapetite
Spotted in https://github.com/FreshRSS/FreshRSS/issues/3638
2021-05-15git update auto change to edge branch (#3589)Gravatar Alexandre Alapetite
* git update auto change to edge branch For existing installations using automatic git update, checkout *edge* branch if it was still using *master* or *dev*. * One more prune * Fix several small issues * theirs does not work here * Use migration mechanism * Better handling of Migration errors * Test details * Fix tests * Do not use new migration system for now
2021-03-26tec: Remove data/do-install.txt (#3555)Gravatar berumuron
* Remove file data/do-install.txt This file was painful during update because we had to remember to delete it each time. It added a security issue by allowing an attacker to reinstall FreshRSS during the update process. The (more powerful) file data/applied_migrations.txt has been introduced in 8619cf6fa to replace do-install.txt. We had to wait for at least one release in order to make sure existing instances of FreshRSS created the migration file. It should be ok now. * Replace i18n install.not_deleted key * Update documentation to update FreshRSS
2021-02-28Travis: Enforce phpcs line length + whitespace (#3488)Gravatar Alexandre Alapetite
* Update Travis line length * Also check whitespace in CSS files * Fix line length ext.php * More syntax, string templates * Fix exclude-pattern * Test JS files as well
2019-11-04Better git fetch (#2626)Gravatar Alexandre Alapetite
Related to https://github.com/FreshRSS/FreshRSS/pull/2625 If for some reasons branches have diverged:, e.g.: ``` $ git status -sb --porcelain remote ## dev...origin/dev [ahead 4, behind 1] ```
2019-11-02Git fetch+reset instead of clean+fetch+merge (#2625)Gravatar Alexandre Alapetite
Fix https://github.com/FreshRSS/FreshRSS/issues/2619 Avoid potentially dangerous git clean, and use more robust fetch + reset strategy instead
2019-08-15tec: Provide a Minz_Mailer class (#2476)Gravatar Marien Fressinaud
* Add Minz_View::_path method (replace change_view) The `_path` method is more powerful since it allows to choose the file extension. It is also Minz_Request-agnostic, which is useful to reuse the Minz_View class in other places. `change_view` is now deprecated and a warning is logged if we use it. * Provide a Minz_Mailer to send emails It uses PHPMailer under the hood and only supports PHP >= 5.5
2019-04-03Revert "Update git command (#2331)"Gravatar Alexis Degrugillier
This reverts commit afd1a8784c2a83426388b39d32703fb82c223f76.
2019-04-03Update git command (#2331)Gravatar Alexis Degrugillier
I removed an unnecessary option and rewrote a short option to use the long option. I find it's easier to understand long options when you don't type them.
2018-09-30git clean before git auto-update (#2036)Gravatar Alexandre Alapetite
* git clean before git auto-update To avoid https://github.com/FreshRSS/FreshRSS/issues/2012 in the future * More generic SQLite file filter * Another -f https://git-scm.com/docs/git-clean
2017-12-02Update panel shows latest version message as success (#1701)Gravatar Kevin Papst
show latest version message as success, FIXES #1586
2017-05-25Do not require write access to check new versionGravatar Alexandre Alapetite
Do not require write access to check if new ZIP version is available https://github.com/FreshRSS/FreshRSS/issues/1450
2017-04-15fix: Fix update via ZIP archiveGravatar Marien Fressinaud
Code from the update server was not loaded anymore before the update process. This commit brings back missing `require`.
2017-02-23Add config option to disable and hide self-updateGravatar Dennis Schwerdel
2016-11-05Add compatibility with git in Web updateGravatar Alexandre Alapetite
https://github.com/FreshRSS/FreshRSS/issues/907 https://github.com/FreshRSS/FreshRSS/issues/1355
2015-11-02Move auto-update server URL in configurationGravatar Marien Fressinaud
Fix https://github.com/FreshRSS/FreshRSS/issues/1019
2015-07-03Updated log visibilityGravatar Alexandre Alapetite
In particular, ensure that ERROR is only used for errors that may affect FreshRSS integrity, and ensure that feed errors are visible also in production, i.e. visibility of WARNING https://github.com/FreshRSS/FreshRSS/issues/885 https://github.com/FreshRSS/FreshRSS/issues/884
2015-01-19Addressed warnings when reading from new filesGravatar Alexandre Alapetite
There were warnings when reading extensions (trying to use e.g. README and .gitignore as directories), and when reading update file. https://github.com/FreshRSS/FreshRSS/issues/733
2015-01-15Improve hook calls and add post_update hookGravatar Marien Fressinaud
- To the hook is associated a method signature (OneToOne or NoneToNone for now) so it is easier to call hooks correctly - post_update hook is called during the post update moment.
2015-01-15Remove restriction of 1h for update checkingGravatar Marien Fressinaud
2015-01-13Show the version number during update process.Gravatar Marien Fressinaud
Number is stored inside the data/last_update.txt file and shown if there is an update script. See https://github.com/FreshRSS/FreshRSS/issues/699