For example on this change, but I've seen it elsewhere before: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/AchievementBadges/+/1060793
We have Selenium tests failing with the error message: "invalidjson: No valid JSON response". See Campaign events, betacommons, RelatedArticles, Popups, Minerva, MediaWiki, Math
This is actually caused by PHP deprecation warnings being emitted in api.php (which causes the response to not be valid JSON). If you know where to look, you can find them in the build artifacts: https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php74-selenium/29880/artifact/log/mw-error.log
2024-08-08 13:09:49 5ed44cfef2b7 wikidb: [17d8b6fb53ab1dc2729c6195] /api.php?format=json PHP Deprecated: Use of wfGetDB was deprecated in MediaWiki 1.39. [Called from MediaWiki\Extension\AchievementBadges\Achievement::selectLogCount]
This is very difficult to find though. Can we tweak something so that this fails the tests in a more understandable way?