Lucas_Werkmeister_WMDE created this task. Lucas_Werkmeister_WMDE added projects: phan, Wikidata. Restricted Application added a subscriber: Aklapper.
TASK DESCRIPTION In Ie808d49aed <https://gerrit.wikimedia.org/r/515093>, as part of T172368: [Task] Make the Wikibase.git code base PSR-4 compatible <https://phabricator.wikimedia.org/T172368>, 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 <https://integration.wikimedia.org/ci/job/mwext-php72-phan-docker/1658/console>): counterexample <?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. TASK DETAIL https://phabricator.wikimedia.org/T227270 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Lucas_Werkmeister_WMDE Cc: Ladsgroup, Lucas_Werkmeister_WMDE, Aklapper, darthmon_wmde, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
