-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to serialize AdminStatusEnum after implemented doctrine Enum #345
Comments
Hey @hiusing Could you provide more details on how you encountered this issue? |
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"]}} |
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:
|
{"error":{"messages":["Encountered object of type \u0022Api\Admin\Enum\AdminStatusEnum\u0022 when serializing Mezzio\Hal\HalResource instance; unable to serialize"]}}
The text was updated successfully, but these errors were encountered: