-
Notifications
You must be signed in to change notification settings - Fork 671
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
Removed TEmpty #6662
Removed TEmpty #6662
Conversation
Are there any specific benefits, apart from getting rid of one of types? |
Yeah, we get rid of a confusion because we never know which type we should use. For example, I used Empty in arithmeticOperation when encountering an operation which threw an error, but I should have used never who emit an issue when assigning or using the value. Never is the bottom type, empty is just a weird type we have for legacy reason and who sometimes act as a bottom type, sometimes an assertion, sometimes as a placeholder for empty arrays I wanted to do that for quite some time, but PHPStan introduced their notion of literal empty array |
Fine by me! I tried this a few months ago and ran into issues, but I can't see any of those issues here so well done, you got further than me. |
19fd10b
to
46fb205
Compare
2b4b02e
to
8a40c65
Compare
@orklah, I may have broken something during rebase; mind looking at this? |
@weirdan nothing major. Matt moved some code from Union to Atomic so my change here has been dropped. On Atomic.php line 805, the line should contain Anyway, I'll actually remove every occurence of EDIT: on a completely unrelated topic: would it be hard to make sure test splitting is the same between windows and linux? I was a little confused when I saw that some tests passed on windows but failed on linux and the other way around before realizing that it was the same test with a different number |
Done.
After someone force-pushes your branch, you need to reset your branch to that new head.
Not hard at all. All we need to do is to use the same scripts on Linux as are currently used on Windows. This will mean we won't have that nice collapsible output that we currently have. |
This PR removes completely TEmpty and replace it with TNever everywhere.
We probably won't be able to merge that as-is for BC reasons, but it will start the discussion.