You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Misuse of $em->find(...) with array as identifier.
Current behavior
$em->find(
Test::class,
['id' => [1234]], // <----- Note the identifier is an array, which is wrong
);
// returns the following PHP warning :// PHP Warning: Array to string conversion in UnitOfWork.php on line 1560
How to reproduce
Create a new directory
mkdir ./reproduce-doctrine-bug
cd ./reproduce-doctrine-bug
Bug Report
Summary
Misuse of
$em->find(...)
with array as identifier.Current behavior
How to reproduce
mkdir ./reproduce-doctrine-bug cd ./reproduce-doctrine-bug
doctrine/orm
andsymfony/cache
repostest.php
to throw the errorreproduce.php
PHP Warning: Array to string conversion
Expected behavior
It would be nice to get just an
UnexpectedValueException
explaining the problem.The text was updated successfully, but these errors were encountered: