Open thePanz opened 5 months ago
Note: I would create a PR myself, but cloning the repo gives me a GIT error, sorry :(
:exploding_head:
I don't reproduce this issue:
$ git clone git@github.com:doctrine/orm.git
Cloning into 'orm'...
remote: Enumerating objects: 183294, done.
remote: Counting objects: 100% (2024/2024), done.
remote: Compressing objects: 100% (642/642), done.
remote: Total 183294 (delta 1312), reused 1804 (delta 1181), pack-reused 181270
Receiving objects: 100% (183294/183294), 50.32 MiB | 5.95 MiB/s, done.
Resolving deltas: 100% (131067/131067), done.
My output is slightly different, I'm getting one less object, and compressing more :thinking:
$ git cat-file -t 3c45ee692037350ffe3b20565bdff0952f60dbd6
tree
$ git cat-file -p 3c45ee692037350ffe3b20565bdff0952f60dbd6
040000 tree 6474aaa0ab3abba2492484a8c433712c5224f555 cookbook
040000 tree 97e113ae4df26334a247dd18a0bf51d885ec4d87 manual
040000
maybe that's the zero-padded file mode? What version of git are you using?
040000
maybe that's the zero-padded file mode? What version of git are you using? I am usinggit version 2.43.0
under Linux (this is the first time I get such error) :shrug:
Same version here, also on Linux so at least it's not that.
@thePanz do you maybe have such settings set to true
: https://stackoverflow.com/q/41029654/353612 ?
I managed to reproduce your issue with
$ git clone --config transfer.fsckobjects=true \
--config receive.fsckobjects=true \
--config fetch.fsckobjects=true \
git@github.com: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 :(