Skip to content

Upgrade to PHPStan 2 - #97

Merged
Alkarex merged 23 commits into
freshrssfrom
phpstan2
Nov 15, 2026
Merged

Alkarex merged 23 commits into
freshrssfrom
phpstan2

Conversation

@Alkarex

@Alkarex Alkarex commented Nov 15, 2026

Copy link
Copy Markdown
Member

Alkarex and others added 23 commits September 14, 2025 16:27
PHPStan has improved a lot since version 1.12 used by SimplePie until now.
Take advantage of explicit PHPStan phpVersion range.
Define explicit range of minimum and maximum PHP version supported. Useful e.g. for function signatures, which have changed over time
https://phpstan.org/config-reference#phpversion
Do not run PHPStan for PHP < 7.4 but the tests are covered by phpVersion min, so it is actually enough to run PHPStan once on any supported PHP version.
Cannot support PHPUnit >= 10 at the same time as PHP 7.2.
Co-authored-by: Jan Tojnar <jtojnar@gmail.com>
# Conflicts:
#	tests/Integration/HTTP/ClientsTest.php
composer.json now requires PHP 7.4, so raise phpVersion.min to match.
That also clears the parse_iri() return type, since PHP 7.4 fills
trailing unmatched groups with PREG_UNMATCHED_AS_NULL.

curlInit() is analysed against the PHP 7 cURL signatures, so type it
as a resource and throw if curl_init() fails. Skip CURLOPT_REFERER and
CURLOPT_USERAGENT when empty, which sends the same request as setting
them to an empty string.
@Alkarex

Alkarex commented Nov 15, 2026 •

Copy link
Copy Markdown
Member Author

Merging fast, as I am preparing another PR requiring PHPStan 2+

@Alkarex
Alkarex merged commit a54d14f into freshrss Nov 15, 2026
18 checks passed
@Alkarex

Alkarex commented Nov 15, 2026

Copy link
Copy Markdown
Member Author

@Frenzie
Frenzie deleted the phpstan2 branch November 16, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants