Skip to content

CP-16831 phql not#17079

Merged
niden merged 6 commits into
5.0.xfrom
CP-16831-phql-not
Jun 6, 2026
Merged

CP-16831 phql not#17079
niden merged 6 commits into
5.0.xfrom
CP-16831-phql-not

Conversation

@niden
Copy link
Copy Markdown
Member

@niden niden commented Jun 5, 2026

Hello!

In raising this pull request, I confirm the following:

  • I have read and understood the Contributing Guidelines
  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • I have updated the relevant CHANGELOG
  • I have created a PR for the documentation about this change

Fixed Phalcon\Mvc\Model\Query (PHQL) parsing of identifiers whose name begins with the NOT keyword. Columns, tables, and aliases such as notice_id were truncated to ice_id (the leading not was dropped), causing the database to report the column as unknown - most visibly in Phalcon\Mvc\Model\Query\Builder join conditions built via createBuilder(). The scanner's re2c backtracking marker shared the token-start pointer, so the NOT BETWEEN rule advanced it past not; escaped identifiers containing internal escapes (e.g. [col\[0\]]) were corrupted by the same root cause.

Thanks

@niden niden requested a review from Jeckerson June 5, 2026 23:15
@niden niden self-assigned this Jun 5, 2026
@niden niden added bug A bug report status: medium Medium 5.0 The issues we want to solve in the 5.0 release labels Jun 5, 2026
@niden niden force-pushed the CP-16831-phql-not branch from 078c2e9 to dd1ccf6 Compare June 6, 2026 01:43
@niden niden merged commit 5bea6ea into 5.0.x Jun 6, 2026
287 of 288 checks passed
@niden niden deleted the CP-16831-phql-not branch June 6, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.0 The issues we want to solve in the 5.0 release bug A bug report status: medium Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant