Last modified: 2013-06-26 12:13:10 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T51878, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49878 - Lua module broken because of incompatibility between SerializerFactory and EntitySerializer
Lua module broken because of incompatibility between SerializerFactory and En...
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataClient (Other open bugs)
unspecified
All All
: Unprioritized blocker (vote)
: ---
Assigned To: Wikidata bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-20 14:40 UTC by Daniel Kinzler
Modified: 2013-06-26 12:13 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Daniel Kinzler 2013-06-20 14:40:39 UTC
SerializerFactory::newSerializerForObject optionally takes a SerializationOptions object. EntitySerializer however requires an EntitySerializerObject. 

Scribunto_LuaWikibaseLibrary calls newSerializerForObject with no options set, which causes a fatal error when trying to instantiate an EntitySerializer.


The issue however is more general: If SerializerFactory takes a generic options object, but some of the serializers require a specialized options object, the caller of the factory function would have to know in advance what kind of object will be constructed.

In fact, any knowledge about the needs and requirements of any of the objects the factory may create essentially renders the factory pointless. For the factory to be useful, it must only request very generic information from the caller.
Comment 1 Gerrit Notification Bot 2013-06-21 09:58:51 UTC
https://gerrit.wikimedia.org/r/69676 (Gerrit Change I4762ad35a43cc2d6e3b8efae75762bcb782e33e2) | change APPROVED and MERGED [by jenkins-bot]
Comment 2 abraham.taherivand 2013-06-26 12:13:10 UTC
Verified Wikidata demo sprint 22-9

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links