Skip to content

Conversation

@dereuromark
Copy link
Member

Summary

  • Add EventInterface parameter types to event listener callbacks in the Events System docs (~15 callback signatures updated)
  • Add void return types to event listener methods that don't return values
  • Add mixed $value, array $context parameter types to custom validation rule closures
  • Add array $context parameter type and bool return type to conditional validation callbacks (on, allowEmpty*, notEmpty*, requirePresence)
  • Add missing use Cake\Event\EventInterface imports to code blocks that needed them

Test plan

  • Verify documentation builds without errors
  • Review code examples for correctness of type signatures

Add EventInterface parameter types and void return types to event
listener callbacks in the Events System documentation. Add typed
parameters (mixed $value, array $context) and return types to
validation callback examples.
Fix invalid valueField 'studentFirstName' to 'first_name' matching
actual database column conventions. Fix indentation of find()
arguments. Add context comment clarifying where the code runs.
@dereuromark dereuromark merged commit 4456d13 into 5.x Jan 30, 2026
5 checks passed
@dereuromark dereuromark deleted the fix-docs-php8-type-hints branch January 30, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants