satis
satis copied to clipboard
Fix errors for phpstan level 6
Hi, I tried to fix all errors from phpstan on level 6. Not sure if you have a specific wish for the format for iterable types (array<int,string>
vs string[]
) but for the rest it should be fine.
Actually, I think I've found a bug on the implementation of strip-hosts, but please double check that part before merging just in case I misunderstood how it's supposed to work.
It should fix #658
I have approved the workflow actions; which have raised several issues. Also it seems your proposed fix makes the tests fail, so I am not sure if that works as you intended.
I'll try to take a look later in the day. I run the tests locally and there was one failing, but it was also failing on main
so I thought it was known. Same for phpstan
, level 5 is failing on the tests folder on main
so I thought you were just checking on src
. I can try to fix the current issues on level 5 on a different MR if you want. I have no idea about JS, I haven't touched any of those files so I can only assume they also fail on main
.
I think they're failing now because the config has been raised to 6 in this PR.
The config applies to both src
and tests
.
https://github.com/composer/satis/blob/5edef22ff3e71209fdcae2cb4eb7a0579e081fa2/phpstan.neon.dist#L5-L7
I stand corrected. It was failing on level 5 for tests
too. You don't have to fix those, but it would be very much appreciated if you do.
That merge commit was not what I intended to do. Let me see if I can resolve this from CLI.
See #731