class ConfigMutationTracker

Tracks configuration mutations made during application boot for worker replay.

This is framework boot infrastructure rather than a userland extension point.

Properties

protected list<array<array-key, mixed>|Repository): void> $mutations

The ordered configuration mutations made during application boot.

protected bool $recording

Whether configuration mutations should be recorded.

Methods

void
observe(Repository $config)

Observe configuration mutations made during application boot.

void
applyAndRecord(Repository $config, Closure $mutation)

Apply and record a configuration operation for worker replay.

void
replay(Repository $config)

Replay the recorded mutations and stop tracking changes in this worker.

Details

at line 35
void observe(Repository $config)

Observe configuration mutations made during application boot.

Boot-only. Calling this outside application bootstrap replaces Foundation's mutation observer and can track the wrong lifecycle.

Parameters

Repository $config

Return Value

void

at line 52
void applyAndRecord(Repository $config, Closure $mutation)

Apply and record a configuration operation for worker replay.

Boot-only. The operation is retained for worker-start replay and is re-evaluated against the freshly rebuilt configuration repository.

Parameters

Repository $config
Closure $mutation

Return Value

void

at line 74
void replay(Repository $config)

Replay the recorded mutations and stop tracking changes in this worker.

Boot-only. Calling this outside the before-worker-start boundary permanently stops recording and can omit later boot mutations.

Parameters

Repository $config

Return Value

void