[PR #11285] Add error handling when misuse of find() with array values #12909

Open
opened 2026-01-22 16:15:34 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/11285

State: closed
Merged: No


Q A
Branch? 3.4.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 : https://github.com/doctrine/orm/issues/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

**Original Pull Request:** https://github.com/doctrine/orm/pull/11285 **State:** closed **Merged:** No --- | Q | A | ------------- | --- | Branch? | 3.4.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 : https://github.com/doctrine/orm/issues/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](https://github.com/doctrine/orm/pull/11237) who has been re-targeted to branch `3.1.x`
admin added the pull-request label 2026-01-22 16:15:34 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#12909