Replies: 3 comments
-
Hey @hiusing Could you provide more details on how you encountered this issue? |
Beta Was this translation helpful? Give feedback.
-
Hi @alexmerlin https://www.dotkernel.com/dotkernel/doctrine-enum-implementation-in-dotkernel/ The latest version of dotkernel api implement the Doctrine EnumType columns in the Admin and User. Mezzio\Hal\HalResource doesn't know how to serialize the AdminStatusEnumType. When you composer serve and hit the endpoint at http://localhost:8080/admin to list all admin. You encounter the following error message at the brower: | {"error":{"messages":["Encountered object of type \u0022Api\Admin\Enum\AdminStatusEnum\u0022 when serializing Mezzio\Hal\HalResource instance; unable to serialize"]}} |
Beta Was this translation helpful? Give feedback.
-
Did you modify anything in your copy of Dotkernel API before running it and encountering this error? Off-topic:We strongly recommend using virtualhosts for running your applications. On-topic:I just tested step-by-step using your method and could not reproduce the issue you are describing. Recommendations:
composer test If the tests succeed, it means that the serialization works. ConclusionLet us know your server specifications so we can narrow down possible causes of the issue you're describing:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
{"error":{"messages":["Encountered object of type \u0022Api\Admin\Enum\AdminStatusEnum\u0022 when serializing Mezzio\Hal\HalResource instance; unable to serialize"]}}
Beta Was this translation helpful? Give feedback.
All reactions