Skip to content

Add regression tests for uninitialized typed properties#32

Merged
byjg merged 2 commits into
masterfrom
6.0
Jul 1, 2026
Merged

Add regression tests for uninitialized typed properties#32
byjg merged 2 commits into
masterfrom
6.0

Conversation

@byjg

@byjg byjg commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Regression tests guarding the fix released in byjg/serializer 6.0.2: repository get() (hydration) and save() (INSERT serialization) with a model whose non-nullable typed properties are left uninitialized no longer raise "Typed property ... must not be accessed before initialization".

byjg added 2 commits July 1, 2026 10:42
Repository hydration serializes an empty model (via anydataset-db's
PreFetchTrait) to enumerate fields, and save() serializes the model to
build the INSERT. When a model has non-nullable typed properties with no
default, both paths used to raise "Typed property ... must not be accessed
before initialization". Fixed in byjg/serializer 6.0.2; these tests cover
both the get() and save() paths and guard against a regression.
@byjg byjg merged commit fb18909 into master Jul 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant