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
{{ message }}
Repository navigation
findBy()/findOneBy() phpdoc doesn't allow SortDirection for $orderBy #12664
At runtime the ORM accepts a SortDirection enum case as an $orderBy value. BasicEntityPersister declares array<string, SortDirection|string>, and passing a string direction is deprecated. The public repository phpdoc does not allow the enum, so static analysis reports an error on correct, non-deprecated code.
The repository phpdoc matches the persister: array<string, 'asc'|'desc'|'ASC'|'DESC'|SortDirection>|null. This needs a change in doctrine/orm for findOneBy() and in doctrine/persistence for findBy().
Activity
greg0ire commentedon Oct 11, 2026
Hi! Thanks for reporthing this. The fix is already done, and will ship in 3.8.0: #12613