Michael created this task.
Michael added projects: wdwb-tech, Technical-Debt, Wikidata.
Restricted Application added a subscriber: Aklapper.
TASK DESCRIPTION
The contract provided by the interface `EntityLookup` for its method
`getEntity` isn't very clear. This should be improved to avoid errors based on
misunderstandings when calling or implementing this method.
interface EntityLookup {
/**
* @note Implementations of this method may or may not resolve
redirects.
* Code that needs control over redirect resolution should use an
* EntityRevisionLookup instead.
*
* @since 2.0
*
* @param EntityId $entityId
*
* @return EntityDocument|null
* @throws EntityLookupException
*/
public function getEntity( EntityId $entityId );
// [...]
}
Source:
https://github.com/wikimedia/Wikibase/blob/84e795d1a8b638949748612901d8b81a2e663905/lib/packages/wikibase/data-model-services/src/Lookup/EntityLookup.php#L31
The comment for that method should be explicit and unambiguous for when
`null` is returned and when `EntityLookupException`.
**Acceptance criteria**
[ ] The phpdoc comment for EntityLookup::getEntity explicitly and
unambiguously states in which circumstances `null` is returned and in which
circumstances `EntityLookupException` is thrown
[ ] All implementations are checked whether they actually comply with this
contract
TASK DETAIL
https://phabricator.wikimedia.org/T291920
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Michael
Cc: Aklapper, Michael, Invadibot, maantietaja, Akuckartz, darthmon_wmde,
DannyS712, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer,
_jensen, rosalieper, Scott_WUaS, Izno, Wikidata-bugs, aude, Dinoguy1000,
Addshore, Mbch331, Jay8g
_______________________________________________
Wikidata-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]