In Ie808d49aed, as part of T172368: Make the Wikibase.git code base PSR-4 compatible, I moved some classes in Wikibase to a more appropriate namespace. Some of them are used in other extensions as well, so for those I added a class_alias with the old name so that the extensions wouldn’t break until they’d been updated for the move. However, phan still fails when analyzing those extensions (console):
<?xml version="1.0" encoding="ISO-8859-15"?> <checkstyle version="6.5"> <file name="WikibaseLexeme.datatypes.php"> <error line="46" severity="error" message="Call to method __construct from undeclared class \Wikibase\Lib\SnakFormat (Did you mean class \Wikibase\Lib\Formatters\SnakFormat)" source="PhanUndeclaredClassMethod"/> <error line="48" severity="error" message="Reference to constant FORMAT_HTML from undeclared class \Wikibase\Lib\SnakFormatter (Did you mean interface \Wikibase\Lib\Formatters\SnakFormatter)" source="PhanUndeclaredClassConstant"/> <error line="48" severity="error" message="Call to method getBaseFormat from undeclared class \Wikibase\Lib\SnakFormat (Did you mean class \Wikibase\Lib\Formatters\SnakFormat)" source="PhanUndeclaredClassMethod"/> <error line="59" severity="error" message="Call to method __construct from undeclared class \Wikibase\Lib\EntityIdValueFormatter (Did you mean class \Wikibase\Lib\Formatters\EntityIdValueFormatter)" source="PhanUndeclaredClassMethod"/> <error line="85" severity="error" message="Call to method __construct from undeclared class \Wikibase\Lib\SnakFormat (Did you mean class \Wikibase\Lib\Formatters\SnakFormat)" source="PhanUndeclaredClassMethod"/> <error line="87" severity="error" message="Reference to constant FORMAT_HTML from undeclared class \Wikibase\Lib\SnakFormatter (Did you mean interface \Wikibase\Lib\Formatters\SnakFormatter)" source="PhanUndeclaredClassConstant"/> <error line="87" severity="error" message="Call to method getBaseFormat from undeclared class \Wikibase\Lib\SnakFormat (Did you mean class \Wikibase\Lib\Formatters\SnakFormat)" source="PhanUndeclaredClassMethod"/> <error line="104" severity="error" message="Call to method __construct from undeclared class \Wikibase\Lib\EntityIdValueFormatter (Did you mean class \Wikibase\Lib\Formatters\EntityIdValueFormatter)" source="PhanUndeclaredClassMethod"/> <error line="125" severity="error" message="Call to method __construct from undeclared class \Wikibase\Lib\SnakFormat (Did you mean class \Wikibase\Lib\Formatters\SnakFormat)" source="PhanUndeclaredClassMethod"/> <error line="127" severity="error" message="Reference to constant FORMAT_HTML from undeclared class \Wikibase\Lib\SnakFormatter (Did you mean interface \Wikibase\Lib\Formatters\SnakFormatter)" source="PhanUndeclaredClassConstant"/> <error line="127" severity="error" message="Call to method getBaseFormat from undeclared class \Wikibase\Lib\SnakFormat (Did you mean class \Wikibase\Lib\Formatters\SnakFormat)" source="PhanUndeclaredClassMethod"/> <error line="130" severity="error" message="Call to method __construct from undeclared class \Wikibase\Lib\EntityIdValueFormatter (Did you mean class \Wikibase\Lib\Formatters\EntityIdValueFormatter)" source="PhanUndeclaredClassMethod"/> <error line="141" severity="error" message="Call to method __construct from undeclared class \Wikibase\Lib\EntityIdValueFormatter (Did you mean class \Wikibase\Lib\Formatters\EntityIdValueFormatter)" source="PhanUndeclaredClassMethod"/> </file> <file name="src/Presentation/Formatters/FormIdHtmlFormatter.php"> <error line="40" severity="warning" message="Property \Wikibase\Lexeme\Presentation\Formatters\FormIdHtmlFormatter-&gt;nonExistingIdFormatter has undeclared type \Wikibase\Lib\NonExistingEntityIdHtmlFormatter (Did you mean class \Wikibase\Lib\Formatters\NonExistingEntityIdHtmlFormatter)" source="PhanUndeclaredTypeProperty"/> <error line="69" severity="error" message="Call to method __construct from undeclared class \Wikibase\Lib\NonExistingEntityIdHtmlFormatter (Did you mean class \Wikibase\Lib\Formatters\NonExistingEntityIdHtmlFormatter)" source="PhanUndeclaredClassMethod"/> <error line="88" severity="error" message="Call to method formatEntityId from undeclared class \Wikibase\Lib\NonExistingEntityIdHtmlFormatter (Did you mean class \Wikibase\Lib\Formatters\NonExistingEntityIdHtmlFormatter)" source="PhanUndeclaredClassMethod"/> </file> </checkstyle>
Does anyone know why that is? In this case, the problem should resolve itself soon (I uploaded patches for all the affected extensions and they’re all +2ed already), but in general it would be concerning if we couldn’t move classes between namespaces even with compatibility aliases.