public function ConfigDiffer::diff in Configuration Update Manager 8
Calculates differences between config.
The two arrays are "normalized" and split into lines to compare differences. It is up to the particular implementing class to decide what normalizing means.
Parameters
array|null $source: Source config.
array|null $target: Target config.
Return value
\Drupal\Component\Diff\Diff Diff object for displaying line-by-line differences between source and target config.
Overrides ConfigDiffInterface::diff
File
- src/
ConfigDiffer.php, line 185
Class
- ConfigDiffer
- Provides methods related to config differences.
Namespace
Drupal\config_updateCode
public function diff($source, $target) {
$source = $this
->normalize($source);
$target = $this
->normalize($target);
$source_lines = $this
->format($source);
$target_lines = $this
->format($target);
return new Diff($source_lines, $target_lines);
}