Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
ondrejmirtes merged 1 commit into phpstan:1.2.x from yguedidi:voter-stub
Aug 5, 2022
Merged

Conversation

Copy link
Contributor

@yguedidi yguedidi commented Jul 15, 2022

To type the $attributes with mixed[] instead of array to be OK until level 9 at least

Copy link
Contributor

herndlm commented Jul 15, 2022

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?

Copy link
Member

  1. Needs to be registered in stubFiles.
  2. What error are you trying to prevent?

Copy link
Contributor Author

@ondrejmirtes

  1. updated
  2. this error: "Method FooVoter::vote() has parameter $attributes with no value type specified in iterable type array." from level 6

Copy link
Contributor Author

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?

Copy link
Contributor

stof commented Jul 15, 2022

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.

herndlm reacted with thumbs up emoji

Copy link
Contributor

stof commented Jul 15, 2022

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.

Copy link
Contributor Author

yguedidi commented Aug 3, 2022

@ondrejmirtes any news here?

@ondrejmirtes ondrejmirtes merged commit f4cb3b8 into phpstan:1.2.x Aug 5, 2022
Copy link
Member

Thank you.

yguedidi reacted with thumbs up emoji

@yguedidi yguedidi deleted the voter-stub branch August 5, 2022 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /