\Drupal\strata\Branch MergeEntry

What a merge decided about one configuration object, and what it would write.

The unit the manifest is made of. It carries the outcome, the merged value, and - for a conflict - both of the values that collided, so the page an operator approves shows the disagreement rather than a count of them.

Summary

Methods
Properties
Constants
__construct
subject
isWritten
isBlocking
describe
jsonSerialize
name
outcome
value
exists
conflicts
fromTheirs
resolved
No public constants found
No protected methods found
No protected properties found
No protected constants found
No private methods found
No private properties found
No private constants found

Properties

$name

$name : string

Type

string

$outcome

$outcome : \Drupal\strata\Branch\MergeOutcome

Type

MergeOutcome

$value

$value : array

Type

array<string|int, mixed>

$exists

$exists : bool

Type

bool

$conflicts

$conflicts : array

Type

array<string|int, mixed>

$fromTheirs

$fromTheirs : array

Type

array<string|int, mixed>

$resolved

$resolved : bool

Type

bool

Methods

__construct()

__construct(string  $name, \Drupal\strata\Branch\MergeOutcome  $outcome, array  $value = [], bool  $exists = true, array  $conflicts = [], list  $fromTheirs = [], bool  $resolved = false) : mixed

Constructs an entry.

Parameters

string $name

The configuration object name, such as system.site.

\Drupal\strata\Branch\MergeOutcome $outcome

What the merge decided.

array $value

The merged data, which is what a write would set. Empty when the merge removes the object.

bool $exists

FALSE when the merge removes the object rather than writing data.

array $conflicts

Dotted key path keyed to the two values that collided, empty unless the outcome is a conflict or a strategy resolved one.

list $fromTheirs

Dotted key paths the branch contributed, which is what makes a merged object legible.

bool $resolved

TRUE when a strategy decided the conflicting keys, so the entry can be written after all.

Returns

mixed —

subject()

subject() : string

The subject path this object is captured under.

Returns

string —

Something such as config/system.site.

isWritten()

isWritten() : bool

Whether applying the merge writes this object.

Returns

bool —

TRUE when the outcome writes, or a strategy resolved a conflict into something to write.

isBlocking()

isBlocking() : bool

Whether this entry stops the plan being applied.

Returns

bool —

TRUE for a conflict no strategy resolved.

describe()

describe() : string

One line naming what the merge would do to this object.

Returns

string —

The description.

jsonSerialize()

jsonSerialize() : array<string,mixed>

{@inheritdoc}

Returns

array

The entry as a plain array. The merged value is left out and only its keys are named, because an audit row is not a place to copy the site's configuration into.