src/Entity/Entity.php
public function getModifications()
    {
        $result = [];

        if (count($this->getModifiedFields())) {
            foreach ($this->getModifiedFields() as $field) {
                $old_value = $this->getOldFieldValue($field);
                $new_value = $this->getFieldValue($field);

                if ($old_value != $new_value) {
                    $result[$field] = [$this->getOldFieldValue($field), $this->getFieldValue($field)];
                }
            }
        }

        return $result;
    }
public function getModifications()
    {
        $result = [];

        if (count($this->getModifiedFields())) {
            foreach ($this->getModifiedFields() as $field) {
                $old_value = $this->getOldFieldValue($field);
                $new_value = $this->getFieldValue($field);

                if ($old_value != $new_value) {
                    $result[$field] = [$this->getOldFieldValue($field), $this->getFieldValue($field)];
                }
            }
        }

        return $result;
    }
{@inheritdoc}