Description
We have agreed to change the definition of references throughout the system:
References will not include Wikidata identifiers, such as those for lexemes (e.g. L12345), lexeme forms, items, and properties.
The same arguments apply to all potential external identifiers, so that the new definition should only include identifiers starting with Z.
Wikilambda ZObjectUtils contains the following pattern matching validation function:
/** * Is the input a valid possible identifier across WMF projects? * * @param string $input * @return bool */ public static function isValidId( string $input ): bool { return preg_match( "/^[A-Z][1-9]\d*$/", $input ); }
ZObjectUtils also contains:
- isValidZObjectReference: matching identifiers that start with the character Z, and
- isValidZObjectKey: matching identifiers that start with the character K.
ZObjectUtils:isValidId is used in some places, we should:
- Check why is this function being used, and
- Replace it with the correct one (most likely isValidZObjectReference)
Completion checklist
- Before closing this task, review one by one the checklist available here: https://www.mediawiki.org/wiki/Abstract_Wikipedia_team/Definition_of_Done#Front-end_Task/Bug_Completion_Checklist