Skip to content

CP-16084 parentheses handling#17080

Merged
niden merged 4 commits into
5.0.xfrom
CP-16084-parentheses-handling
Jun 6, 2026
Merged

CP-16084 parentheses handling#17080
niden merged 4 commits into
5.0.xfrom
CP-16084-parentheses-handling

Conversation

@niden
Copy link
Copy Markdown
Member

@niden niden commented Jun 6, 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\Annotations\Reader failing to parse a docblock when an annotation argument is a string literal containing a parenthesis (e.g. @SomeAnnotation(key='value(')). The docblock pre-scan that locates each @Annotation(...) span counted every (/), including those inside quoted values, so an unbalanced parenthesis in a string consumed the rest of the comment and produced a "Scanning error". String literals (single- or double-quoted, with escapes) are now skipped while matching parentheses.

Thanks

niden added 3 commits June 5, 2026 21:07
Assisted-by: Claude Code
Assisted-by: Claude Code
@niden niden requested a review from Jeckerson June 6, 2026 02:13
@niden niden self-assigned this Jun 6, 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 6, 2026
@niden niden merged commit 5713c6d into 5.0.x Jun 6, 2026
96 checks passed
@niden niden deleted the CP-16084-parentheses-handling branch June 6, 2026 03:10
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