-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Calling method on null when non-backed Enums are used #11173
Comments
🤯 I don't reproduce this issue:
My output is slightly different, I'm getting one less object, and compressing more 🤔
|
|
Same version here, also on Linux so at least it's not that. |
@thePanz do you maybe have such settings set to I managed to reproduce your issue with $ git clone --config transfer.fsckobjects=true \
--config receive.fsckobjects=true \
--config fetch.fsckobjects=true \
[email protected]:doctrine/orm.git doctrine-orm |
Bug Report
Summary
When non-backed enums are used, an error occurs:
Call to a member function getName() on null
.I know that only backed enums are supported, but guiding the developer to fix the issue in an error message should be implemented.
Current behavior
Running
bin/console doctrine:mapping:info
throwsHow to reproduce
Use the following classes. Notes:
Expected behavior
An error message about using a Backed enum should be reported for better DX
I would suggest some changes as to throw an exception in case the enum is not backed, stating which enum is used and in which class and property the error occurred.
Note: I would create a PR myself, but cloning the repo gives me a GIT error, sorry :(
The text was updated successfully, but these errors were encountered: