Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Conversation

@VasekPurchart
Copy link
Contributor

@VasekPurchart VasekPurchart commented Apr 5, 2022
edited
Loading

Test for #313 .


protected function getRule(): Rule
{
return new CatchWithUnthrownExceptionRule();
Copy link
Member

@ondrejmirtes ondrejmirtes Apr 6, 2022

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);

@ondrejmirtes ondrejmirtes merged commit f0695bb into phpstan:1.3.x Apr 6, 2022
Copy link
Member

Thank you!

VasekPurchart reacted with thumbs up emoji

@VasekPurchart VasekPurchart deleted the flush-exception-tests branch April 6, 2022 11:39
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

Reviewers

@ondrejmirtes ondrejmirtes ondrejmirtes approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /