-
Notifications
You must be signed in to change notification settings - Fork 112
Test that UniqueConstraintViolationException from EntityManager::flush() is not marked as dead catch
#315
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
Merged
ondrejmirtes
merged 1 commit into
phpstan:1.3.x
from
VasekPurchart:flush-exception-tests
Apr 6, 2022
Merged
Test that UniqueConstraintViolationException from EntityManager::flush() is not marked as dead catch
#315
ondrejmirtes
merged 1 commit into
phpstan:1.3.x
from
VasekPurchart:flush-exception-tests
Apr 6, 2022
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@VasekPurchart
VasekPurchart
force-pushed
the
flush-exception-tests
branch
from
April 5, 2022 12:29
d0b145f to
35c5fe1
Compare
ondrejmirtes
ondrejmirtes
requested changes
Apr 6, 2022
protected function getRule(): Rule
{
return new CatchWithUnthrownExceptionRule();
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.
You should be able to get rid of the BC message with: self::getContainer()->getByType(CatchWithUnthrownExceptionRule::class);
...h() is not marked as dead catch
@VasekPurchart
VasekPurchart
force-pushed
the
flush-exception-tests
branch
from
April 6, 2022 11:22
35c5fe1 to
30cc417
Compare
ondrejmirtes
ondrejmirtes
approved these changes
Apr 6, 2022
Thank you!
gbirke
added a commit
to wmde/fundraising-payments
that referenced
this pull request
Aug 3, 2023
This is a temporary workaround for the changes made in Doctrine ORM 2.16, discussed in doctrine/orm#10785 When that discussion is resolved, we should remove the check for `RuntimeException`, because it might be thrown by other errors that have nothing to do with duplicate IDs, which would lead to our `PaymentOverrideException` hinting at the wrong thing. Also remove the PHPStan rule that had an exception for this check. When the Exception comes back, the method should have an annotation that it's thrown. Otherwise we'll have to put the PHPStan rule back or try out phpstan-doctrine where this has been solved: phpstan/phpstan-doctrine#315
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
Test for #313 .