mschlenstedt/Loxberry

PHP 8,2 kommt mit Bookworm

Closed this issue · 9 comments

Sämtliche PHP Skripte des Raspberry (speziell die Libs) müssen auf PHP 8.2 migriert werden. Viele Funktionen aus den Libs funktionieren nicht mehr.

Kompletter Test der Libs möglich?

Testing bookworm as well... The bookworm install script worked already, so thanks for that!

php8.2-sqlite3 has to be added as apt package though (testing Sonos plugin e.g.)

Many errors indeed with the PHP upstep... And it's the first plugin I wanted to try out for testing :-).

Maybe the Loxberry bookworm upgrade just have to keep PHP 7.4 (or which exact version was installed?):
https://dmvrtx.me/2023/06/php-7.4-on-debian-bookworm/

And try to provide a setting which could switch the PHP version, so plugin developers have time to adapt...
sudo update-alternatives --set php /usr/bin/php7.4 and sudo update-alternatives --set php /usr/bin/php8.2

Just tried this, and it works great. After following guide above:

apt install php7.4
apt install php7.4-sqlite3
update-alternatives --set php /usr/bin/php7.4
(and reboot)

The Sonos plugin works again at least this way... (had many php errors before)

@Letrab have you created an issue at the Sonos plugin repro for that?

Is there a list of plugins using PHP and not ready for PHP 8.2 ?

@Noschvie , no, why? Loxberry based on Bookworm is highly in development.

Of course we could ask every plugin developer/repro to start testing with PHP 8.2. But I think it will be a very time consuming task, as most plugins (I guess) won't have an automated test suite or something. PHP errors are only flagged when ran, so if some functions contain errors, only at runtime they are seen. Which makes porting/updating cumbersome.

That is why I suggested above to have the 2 PHP versions as a setting in Loxberry. Such that developers have enough time to test out the port to PHP8.

Great! Will check that out!

Thank's for your input, I included PHP 7.4 now into Bookworm and also included PHP 8.x for testing.

https://www.loxforum.com/forum/projektforen/loxberry/allgemeines-aa/412119-betatest-loxberry-3-x-auf-debian-12-bookworm