It has been observed at least for couple of weeks that mwext-php70-phan-docker job failes for Wikibase patches that are submitted to production branches.
Apparently the issue is related to some extensions not being checked out? There are stubs for Babel and PageImages bits used by Wikibase that Phan should pick up, though.
Example of the failure: https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Wikibase/+/440295/ and https://integration.wikimedia.org/ci/job/mwext-php70-phan-docker/8055/console:
09:31:56 + /mediawiki/tests/phan/bin/phan /mediawiki/extensions/Wikibase -m checkstyle 09:32:57 <?xml version="1.0" encoding="ISO-8859-15"?> 09:32:57 <checkstyle version="6.5"> 09:32:57 <file name="lib/includes/LanguageFallbackChainFactory.php"> 09:32:57 <error line="246" severity="error" message="Call to method getCachedUserLanguages from undeclared class \Babel" source="PhanUndeclaredClassMethod"/> 09:32:57 </file> 09:32:57 <file name="repo/includes/BabelUserLanguageLookup.php"> 09:32:57 <error line="40" severity="error" message="Call to method getCachedUserLanguages from undeclared class \Babel" source="PhanUndeclaredClassMethod"/> 09:32:57 </file> 09:32:57 <file name="repo/includes/ParserOutput/EntityParserOutputGeneratorFactory.php"> 09:32:57 <error line="194" severity="error" message="Reference to constant PROP_NAME_FREE from undeclared class \PageImages" source="PhanUndeclaredClassConstant"/> 09:32:57 </file> 09:32:57 </checkstyle>