Make DataDifferencer injectable

Requested by Steve Boyd
This commit is contained in:
Ingo Schommer 2017-11-20 13:48:18 +13:00
parent 4731d3c671
commit d39e9b0bb0

View File

@ -1100,7 +1100,7 @@ class Versioned extends DataExtension implements TemplateGlobalProvider {
$fromRecord = Versioned::get_version($this->owner->class, $this->owner->ID, $from);
$toRecord = Versioned::get_version($this->owner->class, $this->owner->ID, $to);
$diff = new DataDifferencer($fromRecord, $toRecord);
$diff = DataDifferencer::create($fromRecord, $toRecord);
return $diff->diffedData();
}