Commit Graph

43 Commits

Author SHA1 Message Date
Alexandre Alapetite
f7b4a1e742 PHPStan more checkImplicitMixed (#7339)
* PHPStan more checkImplicitMixed

* Draft Entry.php

* Finish Entry.php

* Finish FeedDAO.php and Themes.php
2025-02-23 17:08:17 +01:00
Alexandre Alapetite
825ccf5556 Hide base theme (#7234) 2025-01-21 23:31:40 +01:00
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
Luc SANCHEZ
15745d42b7 Upgrade code to php 8.1 (#6748)
* 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-11-28 17:11:04 +01:00
Alexandre Alapetite
dfac9f5813 PHPStan booleansInConditions (#6793)
* PHPStan booleansInConditions

* Uniformisation
2024-09-11 17:14:53 +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
d2247221bb Minor update whitespace PHPCS rules (#6666)
* 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-01 20:31:40 +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
348028a290 New feature important feeds (#5782)
* New feature important feeds

* Fix PHPStan

* Initial style for important feeds + keep unread

* Change UI order

* Count important unread

* Never mark as read important feeds during scroll

* Fix i18n conf.iew.normal regression

* Fix reader view

* More fix reader view

* Create important.svg

* Fix title

* Fix counter

* Account for important during  mark-all-as-read

* Fix underline colour

* 📌

* Changelog

---------

Co-authored-by: math-gh <>
Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com>
2023-11-08 20:23:54 +01:00
Alexandre Alapetite
06d0099504 Require PHP 7.4+ (#5720)
* 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-30 20:47:27 +01:00
Luc SANCHEZ
f8f163d054 Chore/processing of depreciations and updating code to php72 minimum (#5504)
* 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-07-07 22:36:27 +02:00
Alexandre Alapetite
115724622f PHPStan Level 7 for ten more files (#5327)
* PHPStan Level 7 for nine more files

* Minor syntax

* One more
2023-04-23 11:58:15 +02:00
Alexandre Alapetite
743ca371bb PHPStan Level 6 for more files (#5275)
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4112
2023-04-08 17:37:42 +02:00
maTh
c05e931d5e Deleted: bookmark.svg (#4897)
* delete bookmark.svg

* optimize Pafat theme
2022-11-26 11:31:30 +01:00
maTh
ca6c9345b2 fix: dyn. OPML icon (#4810)
* fix
2022-11-03 22:36:13 +01:00
Nicolas Pereira
3f49827292 feat: add new icon (#4673) 2022-10-04 09:06:48 +02:00
Alexandre Alapetite
509c8cae63 Dynamic OPML (#4407)
* Dynamic OPML draft
#fix https://github.com/FreshRSS/FreshRSS/issues/4191

* Export dynamic OPML
http://opml.org/spec2.opml#1629043127000

* Restart with simpler approach

* Minor revert

* Export dynamic OPML also for single feeds

* Special category type for importing dynamic OPML

* Parameter for excludeMutedFeeds

* Details

* More draft

* i18n

* Fix update

* Draft manual import working

* Working manual refresh

* Draft automatic update

* Working Web refresh + fixes

* Import/export dynamic OPML settings

* Annoying numerous lines in SQL logs

* Fix minor JavaScript error

* Fix auto adding new columns

* Add require

* Add missing 🗲

* Missing space

* Disable adding new feeds to dynamic categories

* Link from import

* i18n typo

* Improve theme icon function

* Fix pink-dark
2022-07-04 09:53:26 +02:00
Alexandre Alapetite
15cdb60ba0 Fix warning with icons (#4390)
Fix warning in cases when the user context is not yet available, for instance during install
Fix regression from https://github.com/FreshRSS/FreshRSS/pull/4353
2022-05-30 10:34:39 +02:00
Alexandre Alapetite
80a228e9a6 Option icons-as-emojis for performance (#4353)
New mode to use only emojis instead of icons.
Considerably improves performances.
Needed for 20k+ feeds scenario https://github.com/FreshRSS/FreshRSS/pull/4347
2022-05-09 12:54:54 +02:00
maTh
9748ac48e4 fix: log (#4273)
* improve css

* scrolling table

* debug icon

* fix css

* Update swage.css

* fix more css

* Update swage.scss

* Delete _components.css

* added: .log-debug
2022-03-16 23:21:28 +01:00
maTh
6650d1d29e Improved: log page (#4204)
* first draft

* wip

* Theme Ansum

* Update logs_pagination.phtml

* Theme Mapco

* Update adark.css

* Update BlueLagoon.css

* Update dark.css

* Update screwdriver.css

* Theme Swage

* Update app/views/helpers/logs_pagination.phtml

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>

* Update app/views/helpers/logs_pagination.phtml

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>

* Update template.css

* Update logs_pagination.phtml

* Update logs_pagination.phtml

* Update logs_pagination.phtml

* RTL CSS

* Update dark.rtl.css

* Update swage.css

* fix CLI findings

* Indentation fixed

* icons improved

* CSS: centered icons

* i18n

* pipline test fixes

* Update conf.php

* Update gen.php

* Update app/i18n/fr/conf.php

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-03-14 23:04:17 +01:00
maTh
926ce8ff5f Improved: icons in same color (#4212)
* delete white plus icon

* delete unused icons

* Themes

* Update flat.css

* minimized XML of SVG icons

* RTL CSS fix

* Update ansum.css

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2022-02-21 19:21:12 +01:00
maTh
d2b6fe099a Improvement: menu icons (#4004)
* default icons

* icons Flat theme

* icons Swage theme

* icon gets bright when hover: Ansum theme

* icon gets bright when hover: Blue lagoon theme

* icon gets bright when hover: Origine/Origine Compact theme

* compressed SVG

* Better formated SVG/XML files

* Update bookmark-tag.svg
2022-01-12 23:04:59 +01:00
maTh
9712e4d888 Headline structure improvement (#3830)
* header: h1 deleted - full logo included

* template: config - display

* WIP

* shortcut configs. added fieldset. do not display the border by default

* system.phtml

* subscription: add feed or category

* wip

* wip

* Update bookmarklet.phtml

* Update archiving.phtml

* Update queries.phtml

* Update profile.phtml

* Update manage.phtml

* auth+update

* Update template.rtl.css

* fixed FreshRSS logo (Theme: Mapco)

* Update mapco.rtl.css

* Update _layout.scss

* fixed FreshRSS logo (theme: Dark)

* fix: FreshRSS logo (Theme: BlueLagoon)

* fix: FreshRSS logo (Theme: Ansum)

* fixed: FreshRSS logo (Theme: Alternative Dark)

* fix: FreshRSS logo (Theme: Pafat)

* fix: FreshRSS logo (Theme: Screwdriver)

* fix: FreshRSS logo (theme: Swage)

* Minor lint

* little fix: FreshRSS logo (Theme: Origine)

* Fix: FreshRSS logo (Theme: Origine Compact)

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-09-11 18:22:26 +02:00
Alexis Degrugillier
d4554fa087 Change add feed action (#3027)
* Docker Alpine 3.12 (#3025)

https://alpinelinux.org/posts/Alpine-3.12.0-released.html
With PHP 7.3.18 (from 7.3.17) (and Apache 2.4.43 unchanged).
No other significant change spotted

* Ensure feed attributes are used before load

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2020-06-05 10:09:31 +02:00
Julien-Pierre Avérous
d30ac40772 Enhance content path feature (#2778)
- Add a maintenance section to be able to clear cache and force reload a feed.
- Add an icon next to path field to show a pop-up with the result of the content path.

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Co-authored-by: Marien Fressinaud <dev@marienfressinaud.fr>
2020-02-13 18:22:35 +01:00
Alexandre Alapetite
8ee8a573f1 Custom labels (#2027)
* First draft of custom tags

https://github.com/FreshRSS/FreshRSS/issues/928
https://github.com/FreshRSS/FreshRSS/issues/1367

* SMALLINT to BIGINT for id_entry

And uppercase SQL types

* Fix layout for unreads

* Start UI menu

* Change menu order

* Clean database helpers

https://github.com/FreshRSS/FreshRSS/pull/2027#discussion_r217971535

* Travis rules do not understand PostgreSQL constants

Grrr

* Tag controller + UI

* Add column attributes to tags

* Use only favicon for now, for label

* Fix styling for different themes

* Constant for maximum InnoDB index length in Unicode

https://github.com/FreshRSS/FreshRSS/pull/2027#discussion_r219052200
(I would have personnally prefered keeping the readability of a real
value instead of a constant, in this case of many SQL fields)

* Use FreshRSS_Factory::createCategoryDao

* Add view of all articles containing any tag

* Fix search in tags

* Mark as read tags

* Partial auto-update unread tags

* More auto update tag unreads

* Add tag deletion

* Do not purge tagged articles

* Minor comment

* Fix SQLite and UI bug

* Google Reader API support for user tags

Add SQL check that tag names must be distinct from category names

* whitespace

* Add missing API for EasyRSS

* Compatibility SQLite

Problematic parentheses

* Add SQL DISTINCT for cases with multiple tags

* Fix for PostgreSQL

PostgreSQL needs some additional type hint to avoid "could not determine
data type of parameter $1"

http://www.postgresql-archive.org/Could-not-determine-data-type-of-parameter-1-tp2171092p2171094.html
2018-09-29 20:47:17 +02:00
Frans de Jonge
4e174ed9dd [ci] Add Travis (#1619)
* [ci] Add Travis

* Exclude some libs

* Semi-auto whitespace fixes

* line length in SQLite

* Exclude tests from line length

* Feed.php line length

* Feed.php: get rid of unnecessary concat

* Feed.php: line length

* bootstrap.php: no newline at end of file

* Allow concatenating across multiple lines

* Add Travis badge

* do-install line length

* update-or-create-user line length

* cli/create-user line length

* tests/app/Models/SearchTest.php fix indentation

* tests/app/Models/UserQueryTest.php fix indentation

* tests/app/Models/CategoryTest.php fix indentation

* [fix] PHP 5.3 on precise

* cli/do-install no spaces

* cli/list-users line length

* cli/reconfigure line length

* empty catch statements

* api/index line length nonsense

* spaces before semicolon

* app/Models/EntryDAO bunch of indentation

* extra blank lines

* spaces before comma in function call

* testing tabwidth

* increase to 10

* comment out tabwidth line

* try older phpcs version 3.0.0RC4

* line length exception for app/install.php

* proper spaces

* stray spaces in i18n

* Minz/ModelPdo line length

* Minz whitespace

* greader line length

* greader elseif placement

* app/Models/Feed.php spacing in function argument

* ignore php 5.3

* app/Models/ConfigurationSetter.php stray whitespace

* EntryDAOSQLite line length

* I vote for higher max line length =P

* ignore SQL

* remove classname complaint

* line length/more legible SQL

* ignore line length nonsense

* greader line length

* feedController issues

* uppercase TRUE, FALSE, NULL

* revert

* importExportController lowercase null

* Share.php default value not necessary because ! is_array () a few lines down

* CategoryDAO constants should be UPPERCASE

* EntryDAO reduce line length

* contentious autofix

* Allow failures on all versions of PHP except 7.1 because reasons
2017-09-22 12:13:46 +02:00
Alexandre Alapetite
b042d3a772 HTTP2 optimization
Fast flush HTTP headers, push promise CSS.
Requires PHP 5.3+ due to anonymous function.
Do not load syles, scripts, and notifications for Ajax requests.
https://github.com/FreshRSS/FreshRSS/issues/1089
2016-04-23 19:10:32 +02:00
Marien Fressinaud
1eef789306 Reorganize subscription management code
There is still a lot of work to do. Some links are broken.

See https://github.com/marienfressinaud/FreshRSS/issues/646
2014-10-01 11:27:41 +02:00
Marien Fressinaud
55843ff7a5 Few fixes about statistics 2014-09-19 16:45:16 +02:00
Marien Fressinaud
f56dd400b7 Add base-theme in p/themes
This base theme is not visible by default (no name). You can use it
to create new theme.
Fix https://github.com/marienfressinaud/FreshRSS/issues/533 (comment)
2014-07-10 17:42:42 +02:00
Marien Fressinaud
c1728fe0d7 Coding style header.phtml + possibility to change logo
See https://github.com/marienfressinaud/FreshRSS/issues/532
2014-07-09 19:39:21 +02:00
Marien Fressinaud
09602acc5f Add two wrappers (_t() and _i())
- _t() is a wrapper for Minz_Translate::t()
- Improve coding style of Translate.php
- _i() is a wrapper for FreshRSS::icon()
- queries.phtml shows how they work
- It is a lot easier to read files with these functions :)
2014-06-15 17:49:23 +02:00
Marien Fressinaud
2b8dc66634 Merge branch 'user-queries' of https://github.com/aledeg/FreshRSS into aledeg-user-queries
Conflicts:
	app/layout/nav_menu.phtml
2014-06-13 20:20:43 +02:00
Marien Fressinaud
e70933dfeb Update links to change view
- Dropdown menu is transformed into stick buttons
- 3 new icons (view-normal, view-global, view-reader)
- Link to access RSS is now next to these buttons (should we kept it
  here?)
2014-06-05 21:25:21 +02:00
Alexis Degrugillier
8521c876d4 Add user queries
It's an intermediary step to remove the favorite button.
I add a button to store the current query as a favorite query. It redirects automatically to the configuration page where it is possible to name and remove user queries.
To make the queries more straigtforward, I removed the default behavior when searching for a string. This way, when we search for a string, the filter is not defaulted to all articles.
2014-05-04 17:23:53 -04:00
Alexis Degrugillier
1e032608a6 Change rss icon fallback value 2014-04-13 07:39:33 -04:00
Alexis Degrugillier
d25afa9def Extract RSS feed from menu
The RSS action has now its own button. I also reorganized the button display order to be more natural.

I did not find an appropriate Unicode replacement for the Rss icon.
2014-04-12 22:46:35 -04:00
Alexis Degrugillier
1af723ca68 Add a button to reveal/hide password
I add a button on the configure user interface to reveal the password for 2 seconds and hide it after that period.

See #442

I am not sure if the fallback unicode text for the icon is correct. I can not make it work.
2014-03-15 07:20:42 -04:00
Alexandre Alapetite
f720d41cbf Mise à jour nom thèmes + chargement robuste des thèmes
Renomme : default -> Origine
En cas de thème introuvable, charge le thème par défaut, sinon le
premier disponible.
https://github.com/marienfressinaud/FreshRSS/issues/120
2014-01-13 22:27:22 +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