Skip to content
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

Fix handling of str_split / mb_str_split string arg compound types + default return type for mb_str_split #1496

Merged
merged 2 commits into from Jul 10, 2022

Conversation

herndlm
Copy link
Contributor

@herndlm herndlm commented Jul 6, 2022

Closes phpstan/phpstan#7580

There were 2 issues basically which is why I split this into 2 commits

StrSplitFunctionReturnTypeExtension could need a bit more cleanup, but I wanted to avoid rewriting it here.. Maybe I'll adapt some more in follow-ups.

@herndlm herndlm marked this pull request as ready for review July 6, 2022 09:03
@mvorisek
Copy link
Contributor

mvorisek commented Jul 7, 2022

FYI, str_split will return empty array for empty string since PHP 8.2, see php/php-src#8945

@herndlm
Copy link
Contributor Author

herndlm commented Jul 7, 2022

FYI, str_split will return empty array for empty string since PHP 8.2, see php/php-src#8945

oh good to know and it least it's consistent then. I'd adapt that in a follow-up if that's ok :) UPDATE: after your linked PR gets merged of course

@ondrejmirtes ondrejmirtes merged commit ef19bb7 into phpstan:1.8.x Jul 10, 2022
@ondrejmirtes
Copy link
Member

Thank you!

@herndlm herndlm deleted the fix-7580 branch July 10, 2022 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants