addText/addPassword - wrong parameter name?
Gappa opened this issue · comments
Version: master
Bug Description
Both addText
and addPassword
methods have a third optional parameter named cols
which is then passed to the TextInput control under the correct HTML attribute name size
.
I think it should be renamed to be more intuitive in regards to PHP named arguments introduced in PHP 8.
Steps To Reproduce
Here's the code for both methods:
Expected Behavior
The parameter is named size
instead of cols
.
Possible Solution
Rename the parameter.
Should I prepare a PR? :)
It's intentional, I think cols
is more concise than universal size
and consistent with cols & rows in addTextArea.
Above all, I want to remove that parameter in the next version.
Well, it depends whether you want to be consistent with the rest of the Forms API or with the legacy HTML attribute :)
Since it's intentional and in fact not a big deal (I've never used that parameter ever), I'm closing it.