Fix tests on 32-bit#957
Merged
ondrejmirtes merged 1 commit intophpstan:masterfrom Jan 29, 2022
herndlm:fix-tests-on-32-bit
Merged
Fix tests on 32-bit#957ondrejmirtes merged 1 commit intophpstan:masterfrom herndlm:fix-tests-on-32-bit
ondrejmirtes merged 1 commit intophpstan:masterfrom
herndlm:fix-tests-on-32-bit
Conversation
Member
|
Nice, thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I know this is kind of esoteric, but this was the only thing that prevented me to cleanly ran
makewith php 8.1 on my 32-bit raspberry pi:I had to add 1G of swap to make it run without freezing the system, but this would in general make the build green on 32-bit. No idea if it's really worth pursuing though, but good to know at least, that right now, even without this fix, phpstan runs still just fine on 32-bit :)
The reason is that this test defines a numeric in a string that is bigger than PHP_INT_MAX, casts it to int and then string again. and the int cast behaves different, depending on PHP_INT_SIZE. https://3v4l.org/enuv2
Only doing that because in #693 some 32/64-bit questions came up. The only important thing, I'd say, is to still support scanning code made for 32-bit, phpstan doesn't have to run on 32-bit. But right know it still could, so I'm just trying to find an answer to the question if we still should support running it on 32-bit :) And if yes - how to make sure it stays like that? If not - is it fine to just drop the runtime support then?