Skip to content

Add type annotations to helper method signatures (Form, Html, Url)#8183

Merged
dereuromark merged 1 commit into5.xfrom
fix-helper-signatures
Jan 28, 2026
Merged

Add type annotations to helper method signatures (Form, Html, Url)#8183
dereuromark merged 1 commit into5.xfrom
fix-helper-signatures

Conversation

@dereuromark
Copy link
Member

Summary

Adds type annotations to method signatures to match the CakePHP 5.x source code:

FormHelper (4 methods):

  • text - added return type : string, default $options = []
  • password - added return type : string, default $options = []
  • end - added array type to $secureAttributes
  • unlockField - added string type to $name, return type : $this

HtmlHelper (3 methods):

  • charset - added ?string type to $charset
  • link - added array|string type to $title, array|string|null to $url
  • setTemplates - added return type : $this

UrlHelper (1 method):

  • build - added array|string|null type to $url

Relates to #7744

Updates signatures to include full type annotations matching CakePHP 5.x source:
- FormHelper: text, password, end, unlockField
- HtmlHelper: charset, link, setTemplates
- UrlHelper: build
@dereuromark dereuromark merged commit 235e1bc into 5.x Jan 28, 2026
5 checks passed
@dereuromark dereuromark deleted the fix-helper-signatures branch January 28, 2026 15:45
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.

2 participants