Mark EntityManagerInterface::isOpen() as impure#739
Merged
ondrejmirtes merged 1 commit intophpstan:2.0.xfrom Mar 13, 2026
Merged
Mark EntityManagerInterface::isOpen() as impure#739ondrejmirtes merged 1 commit intophpstan:2.0.xfrom
ondrejmirtes merged 1 commit intophpstan:2.0.xfrom
Conversation
86e598a to
0f140ec
Compare
0f140ec to
c205368
Compare
VincentLanglet
approved these changes
Mar 13, 2026
Contributor
|
since ondrej had the impression this fix might not work, I think we should back it by a test |
Member
|
It’s fine, it will work. |
Member
|
I was confused in the original issue 😊 |
Member
|
But more work is necessary here - EntityManagerInterface also has the declaration. |
Contributor
This file is already updated in the PR. There is
|
Member
|
Perfect, thank you. I was checking it out on my phone, wanted to provide as fast feedback as possible. |
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
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.
The result of isOpen() depends on the internal state of the EntityManager
and may change during execution (for example after an exception during flush()).
This change follows the existing approach used for other Doctrine methods
that depend on mutable internal state.
Fixes #738