The CI phan job fails on WikibaseCirrusSearch since Wikibase introduced stubs for phan (T217018).
The reason is Wikibase now introduces stub classes for elasticsearch. Since WikibaseCirrusSearch depends on ElasticSearch the concrete classes are available and thus conflict with the stubs from Wikibase.
Example conflict:
\Wikibase\Search\Elastic\DispatchingQueryBuilder inherits Interface \CirrusSearch\Query\FullTextQueryBuilder declared at ../../extensions/CirrusSearch/includes/Query/FullTextQueryBuilder.php:10 which is also declared at ../../extensions/Wikibase/.phan/stubs/cirrussearch.php:225. This may lead to confusing errors."
+ exec /srv/phan/vendor/bin/phan -d . -m checkstyle A future major version of Phan will require PHP 7.1+ to run, but PHP 7.0.33-0+deb9u3 is installed. PHP 7.0 reached its end of life in December 2018. (Set PHAN_SUPPRESS_PHP_UPGRADE_NOTICE=1 to suppress this message) RecursiveDirectoryIterator::__construct(includes/): failed to open dir: No such file or directory RecursiveDirectoryIterator::__construct(maintenance/): failed to open dir: No such file or directory RecursiveDirectoryIterator::__construct(.phan/stubs/): failed to open dir: No such file or directory RecursiveDirectoryIterator::__construct(../../tests/phan/stubs): failed to open dir: No such file or directory <?xml version="1.0" encoding="ISO-8859-15"?> <checkstyle version="6.5"> <file name="src/DispatchingQueryBuilder.php"> <error line="13" severity="warning" message="\Wikibase\Search\Elastic\DispatchingQueryBuilder inherits Interface \CirrusSearch\Query\FullTextQueryBuilder declared at ../../extensions/CirrusSearch/includes/Query/FullTextQueryBuilder.php:10 which is also declared at ../../extensions/Wikibase/.phan/stubs/cirrussearch.php:225. This may lead to confusing errors." source="PhanRedefinedInheritedInterface"/> </file> <file name="src/ElasticTermResult.php"> <error line="19" severity="warning" message="\Wikibase\Search\Elastic\ElasticTermResult inherits Interface \CirrusSearch\Search\ResultsType declared at ../../extensions/CirrusSearch/includes/Search/ResultsType.php:25 which is also declared at ../../extensions/Wikibase/.phan/stubs/cirrussearch.php:275. This may lead to confusing errors." source="PhanRedefinedInheritedInterface"/> </file> <file name="src/EntityFullTextQueryBuilder.php"> <error line="23" severity="warning" message="\Wikibase\Search\Elastic\EntityFullTextQueryBuilder inherits Interface \CirrusSearch\Query\FullTextQueryBuilder declared at ../../extensions/CirrusSearch/includes/Query/FullTextQueryBuilder.php:10 which is also declared at ../../extensions/Wikibase/.phan/stubs/cirrussearch.php:225. This may lead to confusing errors." source="PhanRedefinedInheritedInterface"/> </file> <file name="src/EntityResult.php"> <error line="13" severity="warning" message="\Wikibase\Search\Elastic\EntityResult extends Class \CirrusSearch\Search\Result declared at ../../extensions/CirrusSearch/includes/Search/Result.php:31 which is also declared at ../../extensions/Wikibase/.phan/stubs/cirrussearch.php:269. This may lead to confusing errors." source="PhanRedefinedExtendedClass"/> </file> <file name="src/EntityResultSet.php"> <error line="10" severity="warning" message="\Wikibase\Search\Elastic\EntityResultSet extends Class \CirrusSearch\Search\ResultSet declared at ../../extensions/CirrusSearch/includes/Search/ResultSet.php:26 which is also declared at ../../extensions/Wikibase/.phan/stubs/cirrussearch.php:272. This may lead to confusing errors." source="PhanRedefinedExtendedClass"/> </file> <file name="src/EntityResultType.php"> <error line="11" severity="warning" message="\Wikibase\Search\Elastic\EntityResultType extends abstract Class \CirrusSearch\Search\BaseResultsType declared at ../../extensions/CirrusSearch/includes/Search/BaseResultsType.php:8 which is also declared at ../../extensions/Wikibase/.phan/stubs/cirrussearch.php:282. This may lead to confusing errors." source="PhanRedefinedExtendedClass"/> </file> <file name="src/Query/HasDataForLangFeature.php"> <error line="20" severity="warning" message="\Wikibase\Search\Elastic\Query\HasDataForLangFeature extends abstract Class \CirrusSearch\Query\SimpleKeywordFeature declared at ../../extensions/CirrusSearch/includes/Query/SimpleKeywordFeature.php:18 which is also declared at ../../extensions/Wikibase/.phan/stubs/cirrussearch.php:228. This may lead to confusing errors." source="PhanRedefinedExtendedClass"/> <error line="20" severity="warning" message="\Wikibase\Search\Elastic\Query\HasDataForLangFeature inherits Interface \CirrusSearch\Query\FilterQueryFeature declared at ../../extensions/CirrusSearch/includes/Query/FilterQueryFeature.php:18 which is also declared at ../../extensions/Wikibase/.phan/stubs/cirrussearch.php:222. This may lead to confusing errors." source="PhanRedefinedInheritedInterface"/> </file> <file name="src/Query/HasWbStatementFeature.php"> <error line="56" severity="warning" message="\Wikibase\Search\Elastic\Query\HasWbStatementFeature extends abstract Class \CirrusSearch\Query\SimpleKeywordFeature declared at ../../extensions/CirrusSearch/includes/Query/SimpleKeywordFeature.php:18 which is also declared at ../../extensions/Wikibase/.phan/stubs/cirrussearch.php:228. This may lead to confusing errors." source="PhanRedefinedExtendedClass"/> <error line="56" severity="warning" message="\Wikibase\Search\Elastic\Query\HasWbStatementFeature inherits Interface \CirrusSearch\Query\FilterQueryFeature declared at ../../extensions/CirrusSearch/includes/Query/FilterQueryFeature.php:18 which is also declared at ../../extensions/Wikibase/.phan/stubs/cirrussearch.php:222. This may lead to confusing errors." source="PhanRedefinedInheritedInterface"/> </file> <file name="src/Query/InLabelFeature.php"> <error line="26" severity="warning" message="\Wikibase\Search\Elastic\Query\InLabelFeature extends abstract Class \CirrusSearch\Query\SimpleKeywordFeature declared at ../../extensions/CirrusSearch/includes/Query/SimpleKeywordFeature.php:18 which is also declared at ../../extensions/Wikibase/.phan/stubs/cirrussearch.php:228. This may lead to confusing errors." source="PhanRedefinedExtendedClass"/> <error line="26" severity="warning" message="\Wikibase\Search\Elastic\Query\InLabelFeature inherits Interface \CirrusSearch\Query\FilterQueryFeature declared at ../../extensions/CirrusSearch/includes/Query/FilterQueryFeature.php:18 which is also declared at ../../extensions/Wikibase/.phan/stubs/cirrussearch.php:222. This may lead to confusing errors." source="PhanRedefinedInheritedInterface"/> </file> <file name="src/Query/WbStatementQuantityFeature.php"> <error line="46" severity="warning" message="\Wikibase\Search\Elastic\Query\WbStatementQuantityFeature extends abstract Class \CirrusSearch\Query\SimpleKeywordFeature declared at ../../extensions/CirrusSearch/includes/Query/SimpleKeywordFeature.php:18 which is also declared at ../../extensions/Wikibase/.phan/stubs/cirrussearch.php:228. This may lead to confusing errors." source="PhanRedefinedExtendedClass"/> <error line="46" severity="warning" message="\Wikibase\Search\Elastic\Query\WbStatementQuantityFeature inherits Interface \CirrusSearch\Query\FilterQueryFeature declared at ../../extensions/CirrusSearch/includes/Query/FilterQueryFeature.php:18 which is also declared at ../../extensions/Wikibase/.phan/stubs/cirrussearch.php:222. This may lead to confusing errors." source="PhanRedefinedInheritedInterface"/> </file> <file name="src/WikibasePrefixSearcher.php"> <error line="21" severity="warning" message="\Wikibase\Search\Elastic\WikibasePrefixSearcher extends Class \CirrusSearch\Searcher declared at ../../extensions/CirrusSearch/includes/Searcher.php:60 which is also declared at ../../extensions/Wikibase/.phan/stubs/cirrussearch.php:73. This may lead to confusing errors." source="PhanRedefinedExtendedClass"/> </file> </checkstyle>
See https://integration.wikimedia.org/ci/job/mwext-php70-phan-docker/32909/console
Root case seems to be 494176.
Pinging @Smalyshev because he worked on 511127 and @Umherirrender because @hashar suggested it in #wikimedia-releng.