Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.1 support #1294

Closed
jtojnar opened this issue Dec 22, 2021 · 5 comments · Fixed by #1312
Closed

PHP 8.1 support #1294

jtojnar opened this issue Dec 22, 2021 · 5 comments · Fixed by #1312
Milestone

Comments

@jtojnar
Copy link
Member

jtojnar commented Dec 22, 2021

@jtojnar jtojnar added this to the 2.19 milestone Dec 22, 2021
@Flameborn
Copy link

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
Copy link
Member Author

jtojnar commented Jan 23, 2022

We are still waiting for one of our dependencies to upgrade (PR) – I could temporarily switch to our fork (#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 😞

@Flameborn
Copy link

Thank you very much for the update.

Since I'm running Selfoss from Git, I could switch my copy to #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
Copy link
Member Author

jtojnar commented Jan 23, 2022

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants