Page MenuHomePhabricator

PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /srv/monitoring/lib.php on line 99
Closed, ResolvedPublic

Description

Deprecated in 8.2: https://www.php.net/manual/en/migration82.deprecated.php#migration82.deprecated.core.dollar-brace-interpolation

This is in the monitoring code we that we ship in the PHP production image, which powers the custom /metrics endpoint (offending line).

Since this happens outside of the MediaWiki serving path, this does not end up in said logs, and can only be seen in the php-fpm error log (example entry).

In any case, I'll put together a patch to fix this. Tagging serviceops since this is ours.

Event Timeline

Change #1180653 had a related patch set uploaded (by Scott French; author: Scott French):

[operations/docker-images/production-images@master] php: remove deprecated ${} string interpolation

https://gerrit.wikimedia.org/r/1180653

Change #1180653 merged by Scott French:

[operations/docker-images/production-images@master] php: remove deprecated ${} string interpolation

https://gerrit.wikimedia.org/r/1180653

Mentioned in SAL (#wikimedia-operations) [2025-08-21T16:19:25Z] <swfrench@deploy1003> Started scap sync-world: Deployment to pick up new PHP production images and drop unused metadata label - T402424 T401254

Mentioned in SAL (#wikimedia-operations) [2025-08-21T16:42:09Z] <swfrench@deploy1003> swfrench: Deployment to pick up new PHP production images and drop unused metadata label - T402424 T401254 synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-08-21T16:55:30Z] <swfrench@deploy1003> Finished scap sync-world: Deployment to pick up new PHP production images and drop unused metadata label - T402424 T401254 (duration: 36m 37s)

The fix is now live and I've confirmed that no deprecation notice has been emitted by 8.3 pods running the new image. Previously, this would be emitted once per pod lifetime (makes sense, since judging by the PR linked to the RFC, the notice is emitted during compilation). I've also confirmed that the /metrics endpoint continues to work as expected.