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.
Topic on Talk:Compatibility/Flow
Appearance
AFAIK it has no problems, I run it on PHP 8.1.9 and I don't seem to find any errors or warnings.
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.
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).
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.
I use unmodified MediaWiki code under PHP 8.1.9 and I seem to be having no problems.
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.
@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.)
@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
'.
Note that although there have been several changes landed towards 1.38.3 since 1.38.2 was released, I don't think we've declared it guaranteed to be fully working with PHP 8.0 yet, let alone 8.1, sorry.
@Jdforrester (WMF): Yes, I understand that it is not certified yet, but ArchLinux is running MW 1.38.2 using PHP 8.1 in production. Bleeding edge :) https://wiki.archlinux.org/title/Special:Version
Thanks.