Skip to content

Conversation

derrabus
Copy link
Contributor

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
@ondrejmirtes
Copy link
Member

Thank you! :)

@VincentLanglet
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 derrabus deleted the improvement/compound-stub branch April 12, 2024 09:39
@derrabus
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants