Skip to content

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Oct 1, 2025

followup to #1719

closes phpstan/phpstan#13615

Comment on lines 1389 to 1394
[
"Parameter #2 \$options of function curl_setopt_array expects array{19913: bool, 10102: string, 68: int, 13: int, 84: int, 10036: non-empty-string|null}, array{19913: true, 10102: '', 68: 10, 13: 30, 84: 2, 10036: CurlSetOptArray\BackedRequestMethod::POST} given.",
42,
"Offset 10036 (non-empty-string|null) does not accept type CurlSetOptArray\BackedRequestMethod::POST."
],
Copy link
Contributor Author

@staabm staabm Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh, I did not expect this error, but as it also is emitted for regular parameter types when given a string backed enum, it seems we should have it

@staabm staabm marked this pull request as ready for review October 1, 2025 12:53
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@staabm staabm force-pushed the curl-opt-array branch 2 times, most recently from 59cd1a5 to 142d4e3 Compare October 3, 2025 08:00
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.

assignment of a non backed enum to curl option should error
2 participants