Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Failing test case: Valinor behaves differently on ignored additional …
…keys In this test, Valinor takes a `__construct(list<int> $values)` and behaves differently: * OK with `array{values: list<int>}` * OK with `list<int>` * BROKEN with `array{values: list<int>, ...}` (additional keys) This behavior was initially found by @Tigerman55, and affects de-serialization in a complex nested structure. A workaround that was found to make Valinor consistent is to add an unused argument to the constructor, which seems to make Valinor's behavior more consistent: ```diff /** @param list<int> $values */ - public function __construct(public readonly array $values) + public function __construct(public readonly array $values, bool $_ignored = false) ```
- Loading branch information