Why this is better? Am 06.06.2014 06:08 schrieb "Jeroen De Dauw" <[email protected]>:
> 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(); > > Cheers > > -- > Jeroen De Dauw - http://www.bn2vs.com > Software craftsmanship advocate > Evil software architect at Wikimedia Germany > ~=[,,_,,]:3 > > _______________________________________________ > Wikidata-tech mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/wikidata-tech > >
_______________________________________________ Wikidata-tech mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
