Skip to content

CP-17499 callback closure bind - #17500

Merged
niden merged 2 commits into
5.0.xfrom
CP-17499-callback-closure-bind
Aug 16, 2026
Merged

CP-17499 callback closure bind#17500
niden merged 2 commits into
5.0.xfrom
CP-17499-callback-closure-bind

Conversation

@niden

@niden niden commented Aug 16, 2026

Copy link
Copy Markdown
Member

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

Changed Phalcon\Filter\Validation\Validator\Callback to stop binding the callback closure to the validator; to set the message from inside the callback (#17255), declare a second parameter and call $validator->setTemplate() instead of $this->setTemplate()

Fixed Phalcon\Filter\Validation\Validator\Callback rebinding $this in callback closures; the validator is now passed as a second argument to closures that declare one

Thanks

@niden
niden requested a review from Jeckerson August 16, 2026 00:13
@niden niden self-assigned this Aug 16, 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 Aug 16, 2026
@niden
niden merged commit 65ffc95 into 5.0.x Aug 16, 2026
202 checks passed
@niden
niden deleted the CP-17499-callback-closure-bind branch August 16, 2026 00:50
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