mschlenstedt / Loxberry

Current stable Branch is: *** Please see Releases *** Current developer Branch is: *** master ***
Apache License 2.0
76 stars 27 forks source link

PHP 8,2 kommt mit Bookworm #1462

Closed mschlenstedt closed 5 months ago

mschlenstedt commented 10 months ago

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?

Letrab commented 10 months ago

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.)

Letrab commented 10 months ago

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

Letrab commented 10 months ago

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)

Noschvie commented 10 months ago

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

Noschvie commented 10 months ago

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

Letrab commented 10 months ago

@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.

mschlenstedt commented 10 months ago

Great! Will check that out!

Noschvie commented 10 months ago

LoxBerry-Sonos Request: Support for PHP 8.2

mschlenstedt commented 10 months ago

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