-
Notifications
You must be signed in to change notification settings - Fork 666
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
array_keys() issue only with phar version #2858
Comments
Hey @Rarst, can you reproduce the issue on https://psalm.dev ? |
Hmm, seems to not happen on master, but I am not finding recent issues about |
Okay, this got stranger — I can reproduce this, but only with phar version, even if it has exact same commit version as git checkout. Here is running both on current master of the repo (
|
Possibly related #2953 since on Windows git defaults to checkout with Windows line endings (but commit with Unix line endings). So phar copy would have original Unix line endings, but git copy would have them changed to Windows ones. |
I tried replacing line endings to Unix ones in source PHP files, but still get the issue. :\ |
I've created a POC to reproducte the error:
It happens while using the phar version on windows. Other functions/types that fail in a similar way only on windows:
Let me know if I can do anything to help solve this issue! |
I suspect it's fixed in #10748. @veewee can you try with this phar: https://output.circle-artifacts.com/output/job/2b519c3a-9271-40fe-abfa-7e6f8a894f5c/artifacts/0/build/psalm.phar PS: yes, it took me 4 years to reboot to Windows. |
For this code (a bit too much going on to reproduce in sandbox):
https://github.com/Rarst/laps/blob/168a226859dade7b431d2d69ba751fb3667ee146/src/Record/Collector/Stopwatch_Collector.php#L49-L76
Getting this error:
However
array_keys( $events )
should only contain/pass strings since$events
is documented to only have string keys abovearray<string, StopwatchEvent>
.The text was updated successfully, but these errors were encountered: