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 support #482

Closed
olape-git opened this issue Jan 13, 2021 · 14 comments
Closed

PHP 8 support #482

olape-git opened this issue Jan 13, 2021 · 14 comments
Milestone

Comments

@olape-git
Copy link
Contributor

Would that make sense?
There is still a long way to go until 1.8.

@olape-git olape-git added this to the 1.7.5 milestone Jan 13, 2021
@cmb69
Copy link
Member

cmb69 commented Jan 15, 2021

The biggest issue regarding PHP 8 are likely plugins and addons (and maybe their interactions with the core), and perhaps some templates. Until CMSimple_XH has a version which is compatible with PHP 8, issues in extensions are unlikely to be addressed, or even found in the first place. So I'm +1 on doing this ASAP.

@olape-git
Copy link
Contributor Author

Until CMSimple_XH has a version which is compatible with PHP 8, issues in extensions are unlikely to be addressed, or even found in the first place. So I'm +1 on doing this ASAP.

One more reason.
But it will be a compromise solution.
Because we can't reduce the support for PHP to 7 and 8 in 1.7.

@cmb69
Copy link
Member

cmb69 commented Jan 15, 2021

Because we can't reduce the support for PHP to 7 and 8 in 1.7.

Well, we still need to support PHP 5.3.7, but that shouldn't be a real issue; it's just that we can't use some PHP 7 goodies to catch potential early.

@olape-git
Copy link
Contributor Author

In my tests with the basic 1.7.4 installation, it seems that this fix is actually the only problem.

$this->b = $this->st - 1;

to $this->b = ((int) $this->st) - 1;

I can't see any other things like that.
That would be swell.

@cmb69
Copy link
Member

cmb69 commented Mar 14, 2021

You likely hit #484 with XH 1.7.4 as well. The real problem is that manual testing is likely to miss most issues; without a comprehensive test suite and/or static analysis a lot of edge cases will only be found by users.

@olape-git
Copy link
Contributor Author

image

I can't relate to that, everything is as it should be with me.

@cmb69
Copy link
Member

cmb69 commented Mar 14, 2021

It happens for 'show_last_edit'=>'' (not with 'show_last_edit'=>'0'); the problem is https://3v4l.org/v4p2U.

@olape-git
Copy link
Contributor Author

ok, versuchen wir es mal in de.
Ich verstehe offensichtlich das Problem nicht.

Ich habe bei den Seiten-Parametern keinerlei Meldung, weder von XH noch von Apache.
Nicht, wenn ich den unveränderten originalen Content verwende, noch wenn ich Einstellungen ändere oder diese wieder auf den Urzustand setze.
Alles funktioniert wie gewohnt.

@cmb69
Copy link
Member

cmb69 commented Mar 14, 2021

Wenn ich ein unmodifiziertes XH 1.7.4 unter PHP 8 laufen habe, und dann die Page-Params der "Template"-Seite anschaue, dann ist weder bei "Show last edit" noch bei "Redirect page" etwas vorbelegt. Das liegt daran dass der Vergleich "" == 0 unter PHP 8 eben false ist, so dass kein "selected" ausgegeben wird.

Dieses Problem ist im "master" gelöst, aber ich vermute es gibt halt noch viele andere Stellen (gerade auch in Plugins), wo ähnliches passiert. Es ist grundsätzlich keine gute Idee, == zu verwenden, eben weil PHP da doch sehr speziell ist, und sich "Details" unter PHP 8 ändern.

Aber egal, wir können nicht alles manuell überprüfen, und sollten im Zweifel eben PHP 8 Kompatibilität dokumentieren, und eventuelle Bugs dann halt zeitnah beheben.

@olape-git
Copy link
Contributor Author

Ah, ok.
Jetzt die Frage, ohne lange darüber nachgedacht zu haben.
Warum ist das nicht bei Start, Start-DE, Content oder Inhalt-DE so?
Das fängt wirklich erst bei Templates an.

@cmb69
Copy link
Member

cmb69 commented Mar 14, 2021

Dort ist eine '0' eingetragen (das passiert seit einigen Versionen(?) beim Speichern, aber "Templates" wurde wohl schon eine Weile nicht mehr gespeichert).

@olape-git
Copy link
Contributor Author

ok, dann hätten wir das auch geklärt.

Aber egal, wir können nicht alles manuell überprüfen, und sollten im Zweifel eben PHP 8 Kompatibilität dokumentieren, und eventuelle Bugs dann halt zeitnah beheben.

Das wird dann wohl nicht anders werden.

@olape-git
Copy link
Contributor Author

Habe heute mal den aktuellen Master gezogen und unter 8.0.0 laufen gelassen.
Ich habe keinerlei Fehlermeldungen, ich kann auch nicht festellen, dass irgendwas nicht funktionieren würde.
👍

@cmb69
Copy link
Member

cmb69 commented May 31, 2021

Super! Dann, denke ich, können wir dieses Ticket schließen.

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

No branches or pull requests

2 participants