Skip to content

Improve StrSplit returnType #3999

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

Open
wants to merge 1 commit into
base: 2.1.x
Choose a base branch
from

Conversation

VincentLanglet
Copy link
Contributor

@VincentLanglet VincentLanglet commented May 18, 2025

@VincentLanglet
Copy link
Contributor Author

If it's ok, I opened #4000 first

@VincentLanglet VincentLanglet force-pushed the strSplit branch 12 times, most recently from c4c4d18 to 14649b5 Compare June 13, 2025 00:27
@VincentLanglet VincentLanglet marked this pull request as ready for review June 13, 2025 00:40
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

foreach ($constantStrings as $constantString) {
$value = $constantString->getValue();

if ($encoding === null && $value === '') {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This logic exists to avoid the same issue than phpstan/phpstan#13129

Copy link
Member

@ondrejmirtes ondrejmirtes left a comment

Choose a reason for hiding this comment

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

This one could also be only for 2.1.x.

@VincentLanglet VincentLanglet force-pushed the strSplit branch 2 times, most recently from 12956d2 to 0e64b28 Compare July 17, 2025 16:43
@VincentLanglet VincentLanglet changed the base branch from 1.12.x to 2.1.x July 17, 2025 16:43
@VincentLanglet VincentLanglet force-pushed the strSplit branch 2 times, most recently from 2aeca20 to 80ab977 Compare July 17, 2025 17:36
@VincentLanglet
Copy link
Contributor Author

@ondrejmirtes The HasPropertyTypeTest::testIsSuperTypeOf with data set #4 seems random,
On this PR it fails on PHP 8.4 ubuntu,
But on another PR it onl fails on PHP 8.3 ubuntu
https://github.com/phpstan/phpstan-src/actions/runs/16353254353/job/46205186388?pr=3906
And it changes sometimes when I repush.

So I don't think, it's related to the PR ; this is now ready.

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