mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
3.0 - QueryBuilder - multi-select is not supported #7314
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ondrejmirtes on GitHub (Feb 9, 2024).
Bug Report
Summary
I'm working on ORM 3 and DBAL 4 support on phpstan-doctrine, and I have this test case:
When this method is called, Doctrine crashes with:
Cannot use "::class" on arrayoriginating here:5a40b99e11/src/Query/Expr/Base.php (L63)5a40b99e11/src/Query/Expr/Base.php (L48)5a40b99e11/src/Query/Expr/Base.php (L36)5a40b99e11/src/QueryBuilder.php (L620)This is how
$selectlooks like when coming intonew Expr\Select($select):Current behavior
The method throws an exception.
Expected behavior
It should work because even current 3.0 documentation mentions the possibility to pass arrays into the
selectmethod: https://www.doctrine-project.org/projects/doctrine-orm/en/3.0/reference/query-builder.html#high-level-api-methods