Jump to content

Topic on Talk:Compatibility

PHP 8.1 and MW 1.38.2

11
Enderman0125 (talkcontribs)

MW 1.38.2 works with PHP 8.1.9, so the fact that MW is not compatible with it yet is not true, Haven't tested with 1.38.1 or older versions, but you can check on your own.

Enderman0125 (talkcontribs)

AFAIK it has no problems, I run it on PHP 8.1.9 and I don't seem to find any errors or warnings.

Tystnaden (talkcontribs)

I disagree. My testwiki had a lot of problems when run using PHP 8.1.7. I doubt that those problems were fixed in PHP 8.1.9, it will require changes to the MediaWiki software, which is being worked on.

Dinoguy1000 (talkcontribs)

Several wikis are known to be using various versions of PHP 8; if you're willing to experience (and potentially have to work around) some issues you can use it. It's just not yet officially supported (see Phab workboards for PHP 8.0, PHP 8.1, and PHP 8.2 support).

Tystnaden (talkcontribs)

Yes, I had to go in and hack a bunch of the MediaWiki code to get it to run reasonably, and it still had more problems. I went back to running it under PHP 7.4.

Enderman0125 (talkcontribs)

I use unmodified MediaWiki code under PHP 8.1.9 and I seem to be having no problems.

Tystnaden (talkcontribs)

I do not know how you are avoiding these code paths, but there are numerous PHP library functions in PHP 8+ for which passing a null value is deprecated, and which emit a diagnostic in that case.

Krinkle (talkcontribs)

@Tystnaden: About deprecation warnings, I would consider those as agreeing with "having no problems". I believe most site operators never consult server logs, or only do so after a user-facing failure is found. These logs are often configured to hide deprecation warnings and other non-fatal errors. A deprecation warning generally means that an incompatibility will happen in the future instead of now, e.g. MW would be incompatible with PHP 9 if we don't address the warnings before then.

PHP 8.0-8.1 is advertised as a minor release, thus not (generally) breaking compatibility with web applications. Apart from documented edge cases, MW is likely compatible with PHP 8.1 if it is compatible with 8.0, unless MediaWiki relies on unofficial behaviours.

(I don't rule out that there could be unofficial behaviours, and I am not claiming here that we compatible with PHP 8.0 yet.)

Tystnaden (talkcontribs)

@Krinkle: Yes, I understand what deprecation warnings mean. However, I did learn something here. The php setting 'display_errors' was defaulting to on. So, I turned it off in the php-fpm pool settings, and no more deprecation warnings. I also turned on 'log_errors', and I'll see what pops up in the log.

One other thing: apparently, PHP 8 changed the default value of 'error_reporting' from 'E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED' to 'E_ALL'.

Jdforrester (WMF) (talkcontribs)
Tystnaden (talkcontribs)
Reply to "PHP 8.1 and MW 1.38.2"