https://bugzilla.wikimedia.org/show_bug.cgi?id=49878

       Web browser: ---
            Bug ID: 49878
           Summary: Lua module broken because of incompatibility between
                    SerializerFactory and EntitySerializer
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: blocker
          Priority: Unprioritized
         Component: WikidataRepo
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified
   Mobile Platform: ---

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to