Skip to content
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

Add error handling when misuse of find() with array values #11285

Open
wants to merge 6 commits into
base: 3.1.x
Choose a base branch
from

Conversation

symfonyaml
Copy link

@symfonyaml symfonyaml commented Feb 21, 2024

Q A
Branch? 3.1.x
Bug fix? yes
New feature? no
Issues Fix #11236

Issue

When we (inexpertly) use $em->find(...) with array values in identifer, it returns a PHP warning..
See all details and how to reproduce it in the issue : #11236.

Solution

In this PR

  • Add some DX with an exception explaining the problem, to avoid PHP warning
  • Add tests

Notes

This PR is a copy of this PR who has been re-targeted to branch 3.1.x

src/UnitOfWork.php Outdated Show resolved Hide resolved
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.

None yet

2 participants