-
Notifications
You must be signed in to change notification settings - Fork 96
Add stub for VoterInterface #291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Sorry if that's a stupid question, but is that something that could be done in symfony itself too? Or are they not accepting this?
- Needs to be registered in stubFiles.
- What error are you trying to prevent?
14b6705
to
59de48e
Compare
- updated
- this error: "Method FooVoter::vote() has parameter $attributes with no value type specified in iterable type array." from level 6
59de48e
to
bf0b036
Compare
but is that something that could be done in symfony itself too? Or are they not accepting this?
@stof what do you think about this?
This might be accepted in Symfony (I would vote for it, but not sure about the rest of the core team).
I think one issue is that PHPStorm has a suggestion (enabled in its default config) to replace it with array
as being equivalent.
Note also that this would probably be applied only in the next version of Symfony (as all other type improvements), so the stub might still be useful for the Symfony 5.4 LTS.
To type the
$attributes
withmixed[]
instead ofarray
to be OK until level 9 at least