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

fix !== with union of constants #2700

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 2 commits into phpstan:1.10.x from schlndh:fix-nonIdenticalConstantUnion
Oct 29, 2023

Conversation

@schlndh
Copy link
Contributor

@schlndh schlndh commented Oct 27, 2023

Copy link
Contributor Author

schlndh commented Oct 27, 2023

Somehow this results in the following undesired change for https://phpstan.org/r/6f38a4ed-ff07-4959-9689-7d854de5f0ae 🤔

@@ @@
+PHP 7.4 – 8.3 (1 error)
+==========
+
+26: Expected type string, actual: bool|float|int|string
+
+PHP 7.2 – 7.3 (3 errors)
+==========
+
+24: Class PHPStan\Type\Constant\ConstantStringType not found.
+26: Call to method getValue() on an unknown class PHPStan\Type\Constant\ConstantStringType.
 26: Expected type string, actual: bool|float|int|string

Copy link
Contributor

staabm commented Oct 27, 2023

I think its a unrelated side-effect. the playground sometime reports errors when you use PHPStan internal classes within the snippet

schlndh reacted with thumbs up emoji

@schlndh schlndh force-pushed the fix-nonIdenticalConstantUnion branch from 9fa90af to 39a1890 Compare October 27, 2023 12:54
@schlndh schlndh force-pushed the fix-nonIdenticalConstantUnion branch from f99e852 to 82d9931 Compare October 27, 2023 13:38
@ondrejmirtes ondrejmirtes force-pushed the fix-nonIdenticalConstantUnion branch from 82d9931 to bc8ee00 Compare October 29, 2023 07:37
@ondrejmirtes ondrejmirtes merged commit bc2de58 into phpstan:1.10.x Oct 29, 2023
Copy link
Member

Awesome, thank you!

schlndh reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ondrejmirtes ondrejmirtes ondrejmirtes approved these changes

+1 more reviewer

@staabm staabm staabm left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /