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 Compound::getConstraints() #388

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.3.x from derrabus:improvement/compound-stub
Apr 12, 2024

Conversation

Copy link
Contributor

@derrabus derrabus commented Apr 11, 2024

This PR fixes a error people get when implementing compound constraints:

Method App\Validator\Constraints\MyConstraint::getConstraints() has parameter $options with no value type specified in iterable type array.

Symfony does not document the structure of the $options array, which can be an array of anything.

@derrabus derrabus force-pushed the improvement/compound-stub branch from 4c7c696 to 53bfde1 Compare April 11, 2024 14:50
@derrabus derrabus changed the base branch from 1.4.x to 1.3.x April 11, 2024 14:51
@ondrejmirtes ondrejmirtes merged commit 99848d8 into phpstan:1.3.x Apr 12, 2024
Copy link
Member

Thank you! :)

Copy link
Contributor

Symfony does not document the structure of the $options array, which can be an array of anything.

Looking at the usage, I think it should be array<string, mixed> rather than array<mixed>

I created symfony/symfony#54574 to validate the point @derrabus.

derrabus reacted with thumbs up emoji

@derrabus derrabus deleted the improvement/compound-stub branch April 12, 2024 09:39
Copy link
Contributor Author

Thank you for opening the PR upstream. I've left a comment.

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 によって変換されたページ (->オリジナル) /