Skip to content

API reference / Quittio \ Core \ Serialization \ Snapshots

SnapshotUpcaster

interface in quittio/core

Quittio\Core\Serialization\Snapshots\SnapshotUpcaster · Source

Migrates a stored invoice snapshot from one version to the next one.

Snapshots of issued invoices are never rewritten; upcasters run in memory on read.

Methods#

MethodDescription
->from()Version this upcaster reads; it produces version from() + 1.
->upcast()

from()#

public function from(): int

Version this upcaster reads; it produces version from() + 1.

Returns
int

upcast()#

public function upcast(array<string, mixed> $snapshot): array<string, mixed>
ParameterTypeDescription
$snapshotarray<string, mixed>without the "_version" key
Returns
array<string, mixed>

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.