mirror of
https://github.com/doctrine/orm.git
synced 2026-04-29 09:23:20 +02:00
SimpleConditionalExpressions can not parse CASE ... BETWEEN #7445
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 @hubipe on GitHub (Nov 27, 2024).
Bug Report
Parser can not parse this DQL:
The exception Expected =, <, <=, <>, >, >=, !=, got 'BETWEEN' is raised instead of successful parsing.
The only way around I found about it was to wrap the CASE to a function:
In this case, the query is parsed successfully.
It is worth noting, that adding parentheses anywhere won't help.
Current behavior
Parser raises exception
Expected behavior
Parser should parse the query successfully
How to reproduce
Run this in PHP:
You'll get an exception