Why this is better?
Hey,Constructing entities from their serialization in tests has long been discouraged. A few weeks back we removed support for this on the master branch of DataModel. In going though the remaining occurrences, I find myself surprised that some got introduced as little as two weeks ago, and merged in by a member of the Wikidata team.
What to not do:$item = new Item( array(
....
) );What to do instead (as has been done in most places for quite some time):$item = Item::newEmpty();
$item->setStuff();
CheersSoftware craftsmanship advocate
Evil software architect at Wikimedia Germany
~=[,,_,,]:3
_______________________________________________
Wikidata-tech mailing list
Wikidata-tech@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech