fossar / selfoss

multipurpose rss reader, live stream, mashup, aggregation web application
https://selfoss.aditu.de
GNU General Public License v3.0
2.36k stars 343 forks source link

PHP 8.1 support #1294

Closed jtojnar closed 2 years ago

jtojnar commented 2 years ago
Flameborn commented 2 years ago

What's the current status of this issue?

Arch Linux recently updated to PHP 8.1.2, which won't run cliupdate.php for example.

jtojnar commented 2 years ago

We are still waiting for one of our dependencies to upgrade (PR) – I could temporarily switch to our fork (https://github.com/fossar/selfoss/pull/1312) but that is not without issues.

And it appears the PHPUnit version we use to support older PHP versions does not support PHP 8.1 either :disappointed:

Flameborn commented 2 years ago

Thank you very much for the update.

Since I'm running Selfoss from Git, I could switch my copy to https://github.com/fossar/selfoss/pull/1312 for now. What issues do we have with this fork at the moment?

Re PhpUnit, it's not ideal, but maybe we could drop older PHP versions by switching to a version that has support for Php 8.1 (if it exists). If someone cannot afford to update their php version, I'm aware of existing Selfoss Docker images that could theoretically help with this. Not sure if this is a good enough solution though.

jtojnar commented 2 years ago

The issue is not with the fork but rather with how composer handles vcs repositories – it will try to lookup all dependencies in the vcs repository, significantly slowing down the installation. Additionally, if we merge it, the custom branch will need to be preserved forever of the git revisions relying on it will not be installable (which would make git bisect more painful).

We would need at least PHPUnit 7, which requires PHP 7.1 but we aim to support LTS versions of Debian, which only has PHP 7.0. I do not think Docker is a solution for people on LTS systems since that typically does not work there either AFAIK. And many of those will use cheap shared web hosting, which does not allow anything other than PHP applications.

I am considering switching selfoss development to PHP 8.1 and using Rector to make packages compatible with older version PHP but it still needs more testing.

Flameborn commented 2 years ago

Ah, I see. In that case, I will likely try and switch to this branch for now, possibly until they merge upstream.

Rector looks promising, at least based on a cursory glance at its website.