Closed kudashevs closed 2 years ago
This is a draft of my proposition about the constructor parameters types.
If it looks more or less appropriate, please let me know. I can/want to improve it a little bit and add some additional tests to increase coverage.
I've just realized how many projects use it. Wow! Changing the constructor signature was a bad idea.
I've just realized how many projects use it. Wow! Changing the constructor signature was a bad idea.
Yeah. It's the sort of thing to do when there's a new feature that requires a BC break anyway, so as we're doing a major version, we can consider doing general tidy-up things.
Hello again,
Another proposition is to specify types for all the constructor parameters. However, there is a little problem with the
$attributeName
parameter which isnull
by default (but it is considered to be of thestring
type according to the docblock information). So, specifying its type will result in a breaking change. In my opinion, it is worth doing because it will lead to a more consistent and cleaner parameters list.