-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
I am using this class on a few entities. When trying to de-serialize a translation entity from a JSON file in a command line context - in this case it's phpunit I am getting an error:
Error: Typed property App\Entity\MyDomain\MyType::$locale must not be accessed before initialization
This happens whether I put the locale property in the JSON file or not.
Being pretty new to Symfony, I am not sure how to proceed. Do I need to create a custom normalizer as per these docs, plus maybe a context? https://symfony.com/doc/current/serializer/custom_normalizer.html
Or do I just have the normalizationContext settings in the attributes incorrect?
Metadata
Metadata
Assignees
Labels
No labels