15 Commits

Author SHA1 Message Date
Alexandre Alapetite
b1d24fbdb7 PHPStan 2.0 (#7131)
* 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-12-27 12:12:49 +01:00
Alexandre Alapetite
dfac9f5813 PHPStan booleansInConditions (#6793)
* PHPStan booleansInConditions

* Uniformisation
2024-09-11 17:14:53 +02: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
Luc SANCHEZ
0317683155 Add test and type hinting (#5087)
* - 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-27 00:36:21 +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
maTh
4214954ea1 Improved: error page (#4465)
* error page: true HTML page

* error page: http500 erorr

* error page: add CSP header

* 'log.txt' replaced by LOG_FILENAME

* use ADMIN_LOG

* log.txt => LOG_FILENAME

* error message: add <title>

* Docs created

* delete: documentation on error message page

* line break added

* added: new line at the end

* typo fixed

* Update lib/lib_rss.php

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

* Update lib/lib_rss.php

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

* Minz HTTP 500

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-08-21 22:44:03 +02:00
Alexandre Alapetite
b1c317a253 Log rotation, use Minz_Log, new log constants
ADMIN_LOG, API_LOG, PSHB_LOG
2017-12-10 21:58:24 +01:00
Alexandre Alapetite
481c2a6719 Clean logs
Reduced login of API and PubSubHubbub (both are quite stable now).
When clearing logs as admin, also clear API and PubSubHubbub logs.
https://github.com/FreshRSS/FreshRSS/issues/988
2015-10-24 22:25:48 +02:00
Marien Fressinaud
b5bee85603 BREAKING FEATURE: move user data
- Create ./data/users/ folder
- Move user configuration to ./data/users/username/config.php
- Move sqlite db to ./data/users/username/db.sqlite
- Move user logs to ./data/users/username/log.txt

See https://github.com/FreshRSS/FreshRSS/issues/729
2014-12-21 13:10:02 +01:00
Marien Fressinaud
b5dee73ea0 Coding style
Remove spaces before parenthesis bis

See https://github.com/marienfressinaud/FreshRSS/issues/655
2014-10-05 18:51:08 +02:00
Alexandre Alapetite
bd5d7a7bcb Cache HTTP compatible multi-utilisateur
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/126
2013-12-30 15:00:41 +01:00
Alexandre Alapetite
3cc073f2d1 Log compatible multi-utilisateur
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/126.
Il faudra restaurer la gestion du cache HTTP pour les logs
2013-12-30 12:39:21 +01:00
Alexandre Alapetite
01a1dd09a8 Minz : refactorisation ModelArray et Log
Utilisation de fonctions natives de PHP comme file_put_contents et
var_export
Évite de garder un descripteur de fichier ouvert tout le temps
Et ModelTxt n'est plus utilisé
2013-12-28 17:29:38 +01:00
Alexandre Alapetite
7b7acf5c87 Synchronisation quelques lignes blanches 2013-12-23 13:35:54 +01:00
Alexandre Alapetite
878e96202e Grosse refactorisation pour permettre le chargement automatique des classes
C'est parti de changements pour
https://github.com/marienfressinaud/FreshRSS/issues/255 et finalement
j'ai continué la refactorisation...

Ajout de préfixes FreshRSS_ et Minz_ sur le modèle de SimplePie_.
Toutes les classes sont maintenant en chargement automatique (devrait
améliorer les performances en évitant de charger plein de classes
inutilisées, et faciliter la maintenance).
Suppression de set_include_path().
Si souhaité, certaines classes de Minz pourraient être déplacées dans un
sous-répertoire, par exemple les exceptions.

Tests et relecture nécessaires.
2013-12-15 03:30:24 +01:00