-
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
Improve exception message #9646
Conversation
463f8de
to
46b0342
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a test for the new exception message?
In setups where you have many parameters, or do not even realise you are using an entity, that additional piece of context can be helpful. The parameter name is not always available where the old exception was called though.
46b0342
to
153bd1b
Compare
Binding entities to query parameters only allowed for entities that have an identifier. | ||
Class "Doctrine\Tests\ORM\Functional\Ticket\DDC2084\MyEntity2" does not have an identifier. | ||
EXCEPTION | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@derrabus isn't this change in this test good enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😓 Sorry.
* 2.12.x: Leverage generic persistence event classes (doctrine#9633) Fix static analysis for Persistence 2.5 (doctrine#9648) Improve exception message (doctrine#9646) Deprecate console helper (doctrine#9641) Use charset/collation from column or table default when creating relations (doctrine#9636) Support Enum IDs and search by Enum fields (doctrine#9629) Fix composer install in contributing readme
This was done in reaction to this discussion: #9645
In setups where you have many parameters, or do not even realise you are
using an entity, that additional piece of context can be helpful. The
parameter name is not always available where the old exception was
called though.