Skip to content

Merge-master#32

Merged
Alkarex merged 6 commits intofreshrssfrom
merge-master
Dec 5, 2024
Merged

Merge-master#32
Alkarex merged 6 commits intofreshrssfrom
merge-master

Conversation

@Alkarex
Copy link
Member

@Alkarex Alkarex commented Dec 5, 2024

No description provided.

jtojnar and others added 6 commits September 29, 2024 16:36
This allows developer to create their own own config file, e.g. for setting `editorUrl`:
https://phpstan.org/user-guide/output-format#opening-file-in-an-editor
PHP supports it natively since 5.4.

acaaa76 also started to use it,
presumably to fix sites that were incorrectly declaring `deflate`
method when they were using `gzip`.

And since we require PHP 7.2, and the zlib extension is already
mandatory for the `gzinflate` and `gzuncompress` functions,
let’s also remove the `funcion_exists` check.
When a regex contains a capture group within another capture group followed by `?`,
and the outer group is not matched, the resulting matched text for both groups will be an empty string. (1)
Or, if there are no further matched capture groups, the indices for the groups will be simply omitted from the `$matches` array. (2)

We want missing components of the URI to be `null` so we had a conditionals for the aforementioned matches.

As of PHP 7.2, we can just use `PREG_UNMATCHED_AS_NULL` to get `null`s in the case (1):
https://www.php.net/manual/en/function.preg-match.php#refsect1-function.preg-match-parameters

If we raised minimum PHP version to 7.4, we would not even need the `isset` to handle (2) because from that version onward, the flag also disables the omission of tail unmatched groups:
https://www.php.net/manual/en/migration74.incompatible.php#migration74.incompatible.pcre

Switch the optional outer capture groups (1, 3, 6 and 8) to anonymous ones now that we are no longer using them for anything.
Looks like this has been incorrect since 5bf1814

Revealed by PHPStan level 8.
* Builds against PHP 8.4 are no longer allowed to fail.

Ref: https://www.php.net/releases/8.4/en.php
@Alkarex Alkarex merged commit dd86e5e into freshrss Dec 5, 2024
@Alkarex Alkarex deleted the merge-master branch December 5, 2024 21:37
Alkarex added a commit to Alkarex/FreshRSS that referenced this pull request Dec 5, 2024
Alkarex added a commit to FreshRSS/FreshRSS that referenced this pull request Dec 5, 2024
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.

3 participants