The following PHP deprecation notice is emitted when running PHPUnit tests in MW master, as can be seen in CI (ex):
> phpunit '--group' 'Database' '--exclude-group' 'Broken,ParserFuzz,Stub,Standalone' Using PHP 7.4.33 Running with MediaWiki settings because there might be integration tests PHP Deprecated: Use of MediaWiki\Parser\ParserOutput::setTOCHTML was deprecated in MediaWiki 1.40. [Called from MediaWiki\Tests\Parser\ParserCacheSerializationTestCases::getParserOutputTestCases in /workspace/src/tests/phpunit/includes/parser/ParserCacheSerializationTestCases.php at line 236] in /workspace/src/includes/debug/MWDebug.php on line 378 PHPUnit 9.5.28 by Sebastian Bergmann and contributors.
This is not causing the build to fail. I suspect it only affects tests, and the notice might be emitted early on during the PHPUnit initialisation process (e.g., when running data providers). Once this is investigated and resolved, we should probably find a way to have this kind of notices make the PHPUnit command fail, as I've seen similar silent warnings quite a few times over the years.