s9y / Serendipity

A PHP blog software
https://s9y.org
BSD 3-Clause "New" or "Revised" License
207 stars 87 forks source link

Beta preparation for PHP 8 compatible version #766

Closed onli closed 3 years ago

onli commented 3 years ago

In the last weeks, months now, commit after commit fixed code parts in the core that threw Warnings/Error with PHP 8. It is time to finish that work and release a beta version for those users that want to use PHP 8.

But I think some things still need to be done:

If you can help, please install the current master with PHP 8, then install your favorite plugins or themes. If errors occur please fix them, or at least report them in this thread.

onli commented 3 years ago

Production mode enabled for beta/rc versions in https://github.com/s9y/Serendipity/commit/fa69a788a820903ab519a6050cd0c71508ff6b28

onli commented 3 years ago

I checked the recommended themes. There might still be warnings in subpages and previews, but at least the main pages work for me without warnings now.

surrim commented 3 years ago

I'm still working on it. Till now I have 21 files changed, 115 insertions(+), 62 deletions(-) - Serendipity 9 files changed, 24 insertions(+), 41 deletions(-) - _additionalplugins ... also affecting 2k11 theme and some core functions/plugins

onli commented 3 years ago

I'm surprised that 2k11 and core plugins still have to be changed, but together with other plugins that's certainly possible. Don't hesitate to commit and push the changes already, in doubt into a branch that we can test and merge.

surrim commented 3 years ago

Please take a look at https://github.com/s9y/Serendipity/pull/769 and https://github.com/s9y/additional_plugins/pull/131. I tried to do my best, but some code is not really good to understand. Maybe a list of PHP8 ready plugins would be great. Some plugins are looking very old and not really maintained any more. Maybe there is also a Smarty update for PHP8.

onli commented 3 years ago

I'll have a look. Saw no problem so far, but I should test it a bit. And I assume that raising the versions of the plugins will be a lot of work. Thanks a lot for this effort, looks like it was a lot of work!

Maybe a list of PHP8 ready plugins would be great.

At least here, on a wiki page. I agree, and I wanted to test more plugins anyway.

Maybe there is also a Smarty update for PHP8.

We are on the current release, https://github.com/smarty-php/smarty/releases/tag/v3.1.39, which didn't help. Their PHP 8 branch, https://github.com/smarty-php/smarty/tree/feature/php8-support, seems to be dormant. I still hope for some help from there as well, but it looks bleak. Anyway, the modern themes should be in a good state now and the others should be salvageable with the suppressed warnings of https://github.com/s9y/Serendipity/commit/fa69a788a820903ab519a6050cd0c71508ff6b28.

onli commented 3 years ago

Update regarding the themes.

I went through the list, reached the MT-Themes and will stop here for now. The themes work better than expected, with enabled production mode most don't raise errors. I repaired the few that did, apart from Mo3 - that one might work with the required plugins installed, something to test later (it looks very complex).

Some themes look broken though. So far, I noticed breakage in:

Probably also in some alphabetically prior themes, I did not start taking notes immediately. Smaller details might be broken in others as well.

Additionally, all themes that use the 2k11 commentform without being made for that do not display that one properly, as they miss the needed CSS to align it. That might be fixable in one swoop with some inline CSS or a new HTML approach. The ul styling (that 2k11 hides) is also problematic sometimes and something we could fix globally.

It could be a rewarding and very worthwhile project to get all of the additional themes to work properly. There are quite some blogs out there using them, and it's nice to see the better classical themes in the wild. We should foster that and provide them an upgrade path that keeps the themes intact. But fixing the details of all of them would also be a lot of work and we should not wait with a PHP8 compatibility release for that - the goal of "don't throw a 500 error" is still good enough for now imho.

I'll continue with the theme checks probably later next week, if no one jumps in and finishes this work before me.

onli commented 3 years ago

Okay, done! :) All critical errors in the additional themes are fixed.

Imo we are now ready for a beta release. Remaining issues in the core could then be fixes as reported, same goes for possible plugin incompatibilities. I will try to get some help with the release now.