11 Commits

Author SHA1 Message Date
maTh
2bcc090622 configurable notification timeout (#7942)
Ref #7931
Ref #5466
Ref #6409

added configuration in "Display"
<img width="636" height="167" alt="grafik" src="https://github.com/user-attachments/assets/7bbc9f26-d91b-4dd2-b715-1d3f9b7a9ad3" />

* i18n: fr

* Update app/i18n/pl/conf.php

Co-authored-by: Inverle <inverle@proton.me>

* make fix-all

* max()

* Minor whitespace
(I am not a fan of excessive vertical indenting)

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Co-authored-by: Inverle <inverle@proton.me>
2025-10-01 10:48:07 +02:00
Alexandre Alapetite
a81656c3ed Upgrade to PHP 8.1 (#6711)
* 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-09-06 09:06:46 +02:00
Alexandre Alapetite
5b28a35003 Pass PHPStan level 9 (#6544)
* 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-09 20:32:12 +02:00
Alexandre Alapetite
a80a5f48a1 Pass PHPStan level 8 (#5946)
* 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-18 17:59:16 +01:00
Luc SANCHEZ
30c7a61a9b Use strict_types (#5830)
* 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-11-16 22:43:00 +01:00
Alexandre Alapetite
6c01e4e7d6 Use typed access to request parameters (#5267)
* Use typed access to request parameters
This was a big source of mixed datatypes in many places

* Fix notifications

* Fix bookmarkAction
2023-04-07 00:13:49 +02:00
Luc SANCHEZ
5f898dcc5e Modernize Constants and use new constant for string 'currentUser' (#5089)
* 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-26 14:17:22 +02:00
Luc SANCHEZ
247215ffaa Typehint some Controllers (#5106)
* Typehint to Controllers

* Remarque's from Alkarex

* Remarque's from Alkarex

* Remarque's from Alkarex

* Remarque's from Alkarex

* Remarque's from Alkarex

* Remarque's from Alkarex

---------

Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
2023-03-21 18:57:57 +01:00
Alexandre Alapetite
1335a0e3cf PHPStan level 5 (#4110)
* 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
2022-01-04 13:59:09 +01:00
Alexandre Alapetite
bb9b166eb1 Fix CLI api_password (#3179)
* Fix CLI api_password

#fix https://github.com/FreshRSS/FreshRSS/issues/3177
Fix regression from https://github.com/FreshRSS/FreshRSS/pull/2675

* Update cli/_update-or-create-user.php

Co-authored-by: oupala <oupala@users.noreply.github.com>

Co-authored-by: oupala <oupala@users.noreply.github.com>
2020-09-17 09:43:39 +02:00
Marien Fressinaud
d0f1f9f141 Separate the update API password endpoint (#2675)
* Extract hashPassword method from userController

* Extract and refactor fever key-related methods

* Move update of API password to dedicated action

* Simplify the controller by refactoring feverUtil

* Add locales
2019-12-03 23:11:06 +01:00