-
-
Notifications
You must be signed in to change notification settings - Fork 835
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
[Bug]: enum_exists(): Argument #1 ($enum) must be of type string, array given #2327
Comments
Do you also have this issue with the latest version? |
Yes , when i try with composer update its update to 4.23 and show me same error. |
I'm seeing this when I override the type with JMS to enforce a backed enum to be serialized with its name. This looks as follows:
This is caused due to the type not being just a string, but an array: So, it looks like this: As that comes from JMS and is handled in JMS correctly, I believe it should be handled here as well. PR incoming! |
It is only partly handled in JMS, because for this particular type annotation you apparently are required to wrap the type with quotes. So, for the example above it should become:
Then it works as it should. Another PR will be made at JMS to solve this inconsistency. |
Version
4.23
Description
When i update version from 4.10 to 4.23 . i am getting above issue
JSON OpenApi
JSON OpenApi
Replace this text with your JSON (`bin/console nelmio:apidoc:dump`)
Additional context
nelmio_api_doc:
models:
use_jms: true
The text was updated successfully, but these errors were encountered: