19declare(strict_types=1);
32 private readonly ?
string $legacy_version
36 public function process(
object $carry): void
42 if ($carry->normalized() ===
null) {
43 $carry->setResult(
null);
47 if (is_string($carry->expected())) {
48 $normalizer = $this->registry->forDenormalization(
52 if ($normalizer !==
null) {
54 $normalizer->denormalize($carry->normalized(), $carry->expected())
61 if (!is_array($carry->normalized())) {
63 'Expected normalized array, got ' . get_debug_type($carry->normalized())
66 $carry->setResult($carry->expected()->fromNormalized(
68 $carry->transformations()
Registry for normalizers.
Exception thrown when a value cannot be normalized or denormalized.
Carries normalized data, its expected type and eventual result through denormalization processors.
__construct(private readonly Registry $registry, private readonly ?string $legacy_version)