Page MenuHomePhabricator

WikiLambda: Remove unnecessary ZObjectFactory calls from ZObjects constructors
Closed, ResolvedPublic


ZObjectFactory creation methods should call the ZObjects/* classes constructors passing as parameters the already built ZObject instances. Some classes still invoke ZObjectFactory creation methods from within their constructors. This is because the tests for these classes still use the old creation method.

These classes are:

  • ZObjects/ZMultiLingualString.php
  • ZObjects/ZMultiLingualStringSet.php
  • ZObjects/ZMonoLingualString.php
  • ZObjects/ZMonoLingualStringSet.php

Similarly, in other places we are invoking the ZObjectFactory creation methods on keyValue getter, which should also be removed.

  • ZObjects/ZObject.php

Ultimately we should make sure that ZObjectFactory creation methods are not called from any of the classes in the ZObjects directory, and that instances of any of those classes are only constructed using the ZObjectFactory

Event Timeline

Change 742980 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] Remove ZObjectFactory creation calls from ZObject constructors

Change 742980 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Remove ZObjectFactory creation calls from ZObject constructors