ManifestMerger
in package
FinalYes
Deterministically combines two decoded Unity manifest objects.
stdClass is deliberately retained for JSON objects. Converting objects to associative arrays would make empty objects indistinguishable from empty lists and would turn objects with sequential numeric keys into lists.
Conflict rules:
- objects merge structurally and installation-provided scalar values and object-key values win conflicts;
- dependencies merge by package name and installation-provided versions win;
- general lists retain existing order, append installation values, and remove exactly equal values without coercing their JSON types;
- scoped registries merge by exact URL, installation-provided fields win, and scopes are unioned in order without exact duplicates.
Table of Contents
Methods
- merge() : stdClass
Methods
merge()
public
merge(stdClass $existing, stdClass $incoming) : stdClass
Parameters
- $existing : stdClass
- $incoming : stdClass