WCF icon indicating copy to clipboard operation
WCF copied to clipboard

PHP 8.5 Support

Open dtdesign opened this issue 2 months ago • 2 comments

We’re currently only targeting PHP 8.1-8.4 since PHP 8.5 is not yet released and dependencies had not been updated. This has changed in so far as dependencies are being updated.

State of Dependencies

$> composer why-not php 8.5
cuyz/valinor                2.2.2  requires php (~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0)           
laminas/laminas-diactoros   3.7.0  requires php (~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0)           
laminas/laminas-progressbar 2.14.1 requires php (~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0) 
laminas/laminas-stdlib      3.20.0 requires php (~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0)           
woltlab/webp-exif           v0.1.1 requires php (~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0) 

Details on Current Blockers

Name Compatibility Notes
cuyz/valinor ⏱️ Unreleased, but support for 8.5 was added.
laminas/laminas-diactoros v3.8.0 Effectively compatible with 8.1
laminas/laminas-progressbar Discontinued, compatibility unknown
laminas/laminas-stdlib v3.21.0 Effectively compatible with 8.1
woltlab/webp-exif WoltLab/webp-exif#1

laminas/laminas-progressbar must either be replaced entirely or soft-forked (fork with only updates to the compatibility) for the time being, but this will only postpone the replacement.

Ignoring the Minimum Requirements of Libraries

So far the requirements of laminas/laminas-diactoros and laminas/laminas-stdlib formally exclude PHP 8.1 but are effectively compatible. We need to check if laminas/laminas-progressbar is compatible with PHP 8.5 and if yes we can just ship the newer version of the libraries and are able to support PHP 8.1-8.5.

PHP Support in Major Linux Distributions

Name PHP Notes
Debian 12 (oldstable) 8.2 Incompatible if PHP >= 8.3
Debian 13 (stable) 8.4
Ubuntu 22.04 LTS 8.1 Incompatible if PHP >= 8.2
Ubuntu 24.04 LTS 8.3
AlmaLinux 9.6 8.3
Rocky Linux 9.6 8.3
CentOS Stream 9 8.0 Incompatible
CentOS Stream 10 8.3

Increasing the Minimum Supported PHP Version

The security support for PHP 8.1 expires by the end of 2025 which is really not that far off from now, with PHP 8.2 ending by the end of next year. Increasing the minimum PHP version to 8.2 would satisfy the requirements of the Laminas packages and allow us to support PHP 8.5.

Benefits of Requiring PHP 8.2

All in all, PHP 8.2 is what I would consider to be a “boring” release because it offers little to improve the life of developers. This is also the primary motivation of sticking with PHP 8.1 for this release because increasing the minimum version creates friction without much gains.

Benefits of Requiring PHP 8.3

This is a bit of a different story because requiring PHP 8.3 would break the support for Debian 12 which is still popular, especially because MySQL isn’t yet offered by Oracle for Debian 13 at the time of writing. Other than that there are no other incompatibilities with popular distributions because Ubuntu 24.04 LTS already ships with 8.3. The same applies to the different flavors of “RHEL in disguise”.

  • Typed class constants are a nice-to-have feature but is currently supported through PHPDoc comments.
  • The DOM API has finally been updated and now supports helper functions like contains() and insertAdjacentElement() alongside properties like \DOMElement::$id and \DOMElement::$className. There is now also \DOMNode::$parentElement which is an annoying screw-up because it has existed for an eternity in browsers.
  • #[\Override] is natively supported and thus enforced.
  • \Random\Randomizer::getBytesFromString() is a secure replacement for generating random passwords from a list of characters.

All in all, the changes are not that big from a feature perspective – 8.4 is going to be much more exiting, for example with the native HTML 5 support for DOM. Regardless of this PHP 8.3 is going to see updates until the end of 2027 which aligns much better with the estimated life cycle of WoltLab Suite 6.2.

dtdesign avatar Oct 19 '25 10:10 dtdesign

nikic/FastRoute does not support PHP 8.5 at this point.

dtdesign avatar Nov 24 '25 12:11 dtdesign

WoltLab Suite 6.2 will not ship with support for PHP 8.5 for multiple reasons:

  • Support for PHP 8.1-8.5 is not well supported among third party libraries.
  • Deprecate using values null as an array offset and when calling array_key_exists() is a wide-spread issue to the use of nullable integers as array keys, equally affecting our software and third party code. PHPStan is not yet integrated in all our products, making it significantly harder to catch these issues ahead of time.
  • PHP 8.5 does not offer any significant performance improvements over 8.4 that would justify additional efforts for 6.2.
  • PHP 8.4 is the highest version that ships with any stable Linux distribution, most notably Debian 13 Trixie. There is currently no need to support PHP 8.5 in order to run it with binaries provided by the distribution itself.

dtdesign avatar Nov 24 '25 12:11 dtdesign