Thiemo Mättig (WMDE) has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/337811 )
Change subject: [WIP] EntityDataRetrievalServiceFactory used as
EntityStoreWatcher?
......................................................................
[WIP] EntityDataRetrievalServiceFactory used as EntityStoreWatcher?
This is a quite heavy type safety violation. What this line of code means:
* It assumes all classes that implement the EntityDataRetrievalServiceFactory
interface also implement the EntityStoreWatcher interface.
* Currently there is only one EntityDataRetrievalServiceFactory implementation.
* This means we can as well ditch the interface and type hint against the
specific DispatchingServiceFactory implementation.
An other solution is to add an if ( instanceof EntityStoreWatcher ) check. But
this means the registerWatcher() call might be skipped, and I can not tell if
this is acceptable (probably not).
The patches that introduced this are Id5dfc9e (T155633) and I15d33dd (T155623).
Change-Id: I1895da624e4f5693f05b158243efe03254783bae
---
M repo/includes/Store/Sql/SqlStore.php
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/11/337811/1
diff --git a/repo/includes/Store/Sql/SqlStore.php
b/repo/includes/Store/Sql/SqlStore.php
index ab91f6a..9534127 100644
--- a/repo/includes/Store/Sql/SqlStore.php
+++ b/repo/includes/Store/Sql/SqlStore.php
@@ -446,6 +446,7 @@
if ( $this->entityDataRetrievalServices !== null ) {
// Use $entityDataRetrievalServices as a watcher for
entity changes,
// so that caches of services provided are updated when
necessary.
+ // FIXME: How do we know this implements
EntityStoreWatcher?????????????????????????????
$dispatcher->registerWatcher(
$this->entityDataRetrievalServices );
$nonCachingLookup =
$this->entityDataRetrievalServices->getEntityRevisionLookup();
} else {
--
To view, visit https://gerrit.wikimedia.org/r/337811
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1895da624e4f5693f05b158243efe03254783bae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits