<feed xmlns='http://www.w3.org/2005/Atom'>
<title>FreshRSS (Customized)/app/Models/CategoryDAO.php, branch 1.27.1</title>
<subtitle>Customized version of FreshRSS, a self-hosted RSS feed aggregator</subtitle>
<id>https://git.rdnlsmith.com/fresh-rss-custom/atom?h=1.27.1</id>
<link rel='self' href='https://git.rdnlsmith.com/fresh-rss-custom/atom?h=1.27.1'/>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/'/>
<updated>2025-06-30T10:01:56+00:00</updated>
<entry>
<title>Implement custom feed favicons (#7646)</title>
<updated>2025-06-30T10:01:56+00:00</updated>
<author>
<name>Inverle</name>
<email>inverle@proton.me</email>
</author>
<published>2025-06-30T10:01:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=7915abd833e1ab7a72ad27b3ec52020ac9ab7051'/>
<id>urn:sha1:7915abd833e1ab7a72ad27b3ec52020ac9ab7051</id>
<content type='text'>
Closes #3789, #6503

Icon setting when no custom icon is set yet:

![image](https://github.com/user-attachments/assets/28b07dd0-7dac-4c76-b1d7-77035f91a87a)

- `Change...` button opens a file dialog, and after selecting a file shows the chosen icon in the preview on the left. `Submit` must be clicked after selecting the icon.
- `Reset to default` changes the preview icon to the default one, and also requires `Submit` to be clicked to apply the changes.

Full list of changes:
- CSP now includes `blob:` in `img-src` for
   - `indexAction()` and `feedAction()` in `subscriptionController.php`
   - all of the view actions in `indexController.php`
- Introduce new attribute `customFavicon (boolean)` for feeds that indicates if the feed has a custom favicon
   - `hashFavicon()` in `Feed.php` is dependent on this attribute
      - `hashFavicon()` has a new parameter called `skipCache (boolean)` that allows the reset of the favicon hash for the Feed object
      - `resetFaviconHash()` just calls `hashFavicon(skipCache: true)`
- `f.php` URLs now have the format of `/f.php?h=XXXXX&amp;t=cachebuster`, where the `t` parameter is only used for serving custom favicons
   - if `t` parameter is set, `f.php` returns a `Cache-Control: immutable` header
- `stripos` and `strpos` were changed to `str_contains` in various places (refactor)
- JS for handling the custom favicon configuration logic is in `extra.js` inside `init_update_feed()` which is called when feed configuration is opened from the aside or when the subscription management page with the feed is loaded
   - Server-side code for uploading the icon in `subscriptionController.php` under `feedAction()`
   - Errors that may occur during the setting of a custom favicon:
      - Unsupported image file type (handled only server-side with `isImgMime()`)
      - When the file is bigger than 1 MiB (default), handled both client-side and server-side
      - Standard feed error when `updateFeed()` fails
- JS vars `javascript_vars.phtml` are no longer escaped with `htmlspecialchars()`, instead with json encoding,
- CSS for disabled buttons was added
- Max favicon file size is configurable with the `max_favicon_upload_size` option in `config.php` (not exposed via UI)
- Custom favicons are currently deleted only when they are either reset to the default icon, or the feed gets deleted. They do not get deleted when the user deletes their account without removing their feeds first.
- ` faviconPrepare()` and `faviconRebuild()` are not allowed to be called when the `customFavicon` attribute is `true`
- New i18n strings:
   - `'sub.feed.icon' =&gt; 'Icon'`
   - `'sub.feed.change_favicon' =&gt; 'Change…'`
   - `'sub.feed.reset_favicon' =&gt; 'Reset to default'`
   - `'sub.feed.favicon_changed_by_ext' =&gt; 'The icon has been set by the &lt;b&gt;%s&lt;/b&gt; extension.'`
   - `'feedback.sub.feed.favicon.too_large' =&gt; 'Uploaded icon is too large. The maximum file size is &lt;em&gt;%s&lt;/em&gt;.'`
   - `'feedback.sub.feed.favicon.unsupported_format' =&gt; 'Unsupported image file format!'`
- Extension hook `custom_favicon_hash`
   - `setCustomFavicon()` method
   - `resetCustomFavicon()` method
   - `customFaviconExt` and `customFaviconDisallowDel` attributes
   - example of usage: https://github.com/FreshRSS/Extensions/pull/337
- Extension hook `custom_favicon_btn_url`
   - Allows extensions to implement a button for setting a custom favicon for individual feeds by providing an URL. The URL will be sent a POST request with the `extAction` field set to either `query_icon_info` or `update_icon`, along with an `id` field which describes the feed's ID.
</content>
</entry>
<entry>
<title>Remove several PHPStan ignore (#7665)</title>
<updated>2025-06-14T23:17:20+00:00</updated>
<author>
<name>Alexandre Alapetite</name>
<email>alexandre@alapetite.fr</email>
</author>
<published>2025-06-14T23:17:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=67c42b0e7c4250d7befe61e35994d8f6e439ca7a'/>
<id>urn:sha1:67c42b0e7c4250d7befe61e35994d8f6e439ca7a</id>
<content type='text'>
* Remove several PHPStan ignore
* One syntax error
* PDO returns int, not bool (MySQL and SQLite Boolean types are aliases for tinyint).
* A few missing type hints

* Revert strange PHPStan bug</content>
</entry>
<entry>
<title>Pass phpstan-strict-rules 2.0.4 (#7488)</title>
<updated>2025-04-01T22:46:28+00:00</updated>
<author>
<name>Alexandre Alapetite</name>
<email>alexandre@alapetite.fr</email>
</author>
<published>2025-04-01T22:46:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=78dfb44060921a15f820d5794efcf2898f4333c2'/>
<id>urn:sha1:78dfb44060921a15f820d5794efcf2898f4333c2</id>
<content type='text'>
New check for Boolean in while conditions
Replace https://github.com/FreshRSS/FreshRSS/pull/7481</content>
</entry>
<entry>
<title>Use case-insensitive sort for categories (#7402)</title>
<updated>2025-03-05T13:40:26+00:00</updated>
<author>
<name>Annika Backstrom</name>
<email>abackstrom@etsy.com</email>
</author>
<published>2025-03-05T13:40:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=f40acd78cb1f41801c2d398976fbe0e8663f1bd6'/>
<id>urn:sha1:f40acd78cb1f41801c2d398976fbe0e8663f1bd6</id>
<content type='text'>
Changes proposed in this pull request:

- Use `strnatcasecmp()` inside `listSortedCategories()`

How to test the feature manually:

1. Create categories `A`, `b`, and `C`
2. Observe that categories are sorted case-insensitively on the feed index and Subscription Management pages
</content>
</entry>
<entry>
<title>Reduce undeeded use of elvis operator ?: (#7204)</title>
<updated>2025-01-10T07:13:09+00:00</updated>
<author>
<name>Alexandre Alapetite</name>
<email>alexandre@alapetite.fr</email>
</author>
<published>2025-01-10T07:13:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=5368f38753a3e655ed3d7d7dfc7af2cc22de7980'/>
<id>urn:sha1:5368f38753a3e655ed3d7d7dfc7af2cc22de7980</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix regressions on some array structures (#7155)</title>
<updated>2024-12-28T22:58:00+00:00</updated>
<author>
<name>Alexandre Alapetite</name>
<email>alexandre@alapetite.fr</email>
</author>
<published>2024-12-28T22:58:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=c29cbb7b8be95fee249ed1a21dce98a4772d92e2'/>
<id>urn:sha1:c29cbb7b8be95fee249ed1a21dce98a4772d92e2</id>
<content type='text'>
regressions from https://github.com/FreshRSS/FreshRSS/pull/7131
fix https://github.com/FreshRSS/FreshRSS/issues/7154</content>
</entry>
<entry>
<title>PHPStan 2.0 (#7131)</title>
<updated>2024-12-27T11:12:49+00:00</updated>
<author>
<name>Alexandre Alapetite</name>
<email>alexandre@alapetite.fr</email>
</author>
<published>2024-12-27T11:12:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=b1d24fbdb7d1cc948c946295035dad6df550fb7e'/>
<id>urn:sha1:b1d24fbdb7d1cc948c946295035dad6df550fb7e</id>
<content type='text'>
* 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-&gt;getTagsForEntries()

* Finish reportAnyTypeWideningInVarTag

* Prepare checkBenevolentUnionTypes and checkImplicitMixed

* Fixes

* Refix

* Another fix

* Casing of __METHOD__ constant</content>
</entry>
<entry>
<title>New option mark article as read if identical title in category (#6922)</title>
<updated>2024-10-21T11:41:16+00:00</updated>
<author>
<name>Alexandre Alapetite</name>
<email>alexandre@alapetite.fr</email>
</author>
<published>2024-10-21T11:41:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=aea9ba0d62b86be05e53747c97bfcbc8f4bc4408'/>
<id>urn:sha1:aea9ba0d62b86be05e53747c97bfcbc8f4bc4408</id>
<content type='text'>
* New mark articles as read if identical title in category
fix https://github.com/FreshRSS/FreshRSS/issues/6143

* i18n todo forgotten</content>
</entry>
<entry>
<title>PHPStan booleansInConditions (#6793)</title>
<updated>2024-09-11T15:14:53+00:00</updated>
<author>
<name>Alexandre Alapetite</name>
<email>alexandre@alapetite.fr</email>
</author>
<published>2024-09-11T15:14:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=dfac9f5813df7d4c7c812c381364c8898333f559'/>
<id>urn:sha1:dfac9f5813df7d4c7c812c381364c8898333f559</id>
<content type='text'>
* PHPStan booleansInConditions

* Uniformisation</content>
</entry>
<entry>
<title>Upgrade to PHP 8.1 (#6711)</title>
<updated>2024-09-06T07:06:46+00:00</updated>
<author>
<name>Alexandre Alapetite</name>
<email>alexandre@alapetite.fr</email>
</author>
<published>2024-09-06T07:06:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rdnlsmith.com/fresh-rss-custom/commit/?id=a81656c3ed5b8fe0f31794a4fbe0d1a907fca8e8'/>
<id>urn:sha1:a81656c3ed5b8fe0f31794a4fbe0d1a907fca8e8</id>
<content type='text'>
* 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</content>
</entry>
</feed>
