Page MenuHomePhabricator

Replace php-tideways_xhprof with php-xhprof in MediaWiki-Docker
Open, Needs TriagePublic

Description

Background

  • Tideways has abandoned php-tideways_xhprof in 2023.
  • Debian has removed php-tideways from testing (it is still in stable, but won't be in the next LTS).
  • A few years ago, Wikimedia adopted tideways_xhprof because the original xhprof from Phacility lacked PHP8 support, which Tideways added to their fork. Another fork (which also supports PHP8) has been rewarded the original name and is now continuing the work.
  • Wikimedia is now switching to the latest version of the original xhprof package (for both PHP 8.1 and the upcoming PHP 8.3 upgrade, per T398245#11031778).
  • php-tideways_xhprof was added to MediaWiki-Docker in 2020. T246202: Add tideways-xhprof to PHP image
  • mw:MediaWiki-Docker/Configuration recipes/Profiling says "MediaWiki-Docker comes with php-tideways pre-installed.", but it the latest php8.3 images do not actually install this. This was apparently removed in 2023 (T338208#8992016, commit)

[…] MediaWiki core supports php-xhprof 0.9 and its fork php-tideways_xhprof. The current version of php-xhprof is 2.x, which we have not tested before. As part of the PHP 8.1 to PHP 8.3 upgrade, we will be switching from the abandoned php-tideways-xhprof package to the php-xhprof 2.x package. I wrote more details and reasons for this package choice at T398245#10965108. […]

I've updated the install instructions at https://www.mediawiki.org/wiki/Manual:Profiling to recommend XHProf instead of Tideways going forward, covering various installation methods and distributions.

Scope

Sury provides php-xhprof packages for all PHP versions, although it may be worth doing T401255: Switch PHP 8.3 image of MediaWiki-Docker from Sury to WMF at the same time and installing php8.1-xhprof from WMF instead.

  • Ensure php8.1, php8.2, and php8.3+ images have php-xhprof preinstalled.
  • Update MediaWiki core's docker-compose.yaml to use versions of the images that have php-xhprof installed.