-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Map custom exceptions for the "no default value" (1364) error in the MySQL drivers #2422
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
Conversation
When following error message is shown, then it will get converted to the correct Exception classs of NotNullConstraintViolationException: PDOException: SQLSTATE[HY000]: General error: 1364 Field '...' doesn't have a default value
|
Tests? |
|
Sorry my mistake, did not see that you changed the test file. I will take a look at later and report back. |
Okay. I can also try to add some sort of integration test. Where should they then be added? |
|
@MorrisJobke an integration test that reveals the issue would be great of course but I think the error only applies if the Still the addition is valid of course, so I will accept it as is. Thanks @MorrisJobke ! |
Thanks a lot for this information and for accepting this :) |
|
@deeky666 Should I prepare a backport for this to the 2.5 version? |
|
@MorrisJobke this is not a bug, this won't land in 2.5 |
Okay :) Thanks anyways |
doctrine/dbal#2422 Signed-off-by: Roeland Jago Douma <[email protected]>
When following error message is shown, then it will get converted to the
correct Exception classs of NotNullConstraintViolationException:
PDOException: SQLSTATE[HY000]: General error: 1364 Field '...' doesn't have a
default value
The mentioned field has a Not Null constraint but no default value. I tested this with the latest mysql and mariadb docker container today (and with the mysql and mysqlnd PHP extension of the current Debian stable).