Skip to content

Conversation

@VasekPurchart
Copy link
Contributor

@VasekPurchart VasekPurchart commented Apr 5, 2022

Test for #313 .

@VasekPurchart VasekPurchart force-pushed the flush-exception-tests branch from d0b145f to 35c5fe1 Compare April 5, 2022 12:29

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

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

@VasekPurchart VasekPurchart force-pushed the flush-exception-tests branch from 35c5fe1 to 30cc417 Compare April 6, 2022 11:22
@ondrejmirtes ondrejmirtes merged commit f0695bb into phpstan:1.3.x Apr 6, 2022
@ondrejmirtes
Copy link
Member

Thank you!

@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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants