satis icon indicating copy to clipboard operation
satis copied to clipboard

Fix errors for phpstan level 6

Open j3j5 opened this issue 3 years ago • 5 comments

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

j3j5 avatar Oct 20 '21 19:10 j3j5

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.

alcohol avatar Oct 21 '21 11:10 alcohol

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.

j3j5 avatar Oct 21 '21 12:10 j3j5

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

alcohol avatar Oct 21 '21 13:10 alcohol

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.

alcohol avatar Oct 21 '21 13:10 alcohol

That merge commit was not what I intended to do. Let me see if I can resolve this from CLI.

alcohol avatar Mar 21 '22 14:03 alcohol

See #731

alcohol avatar Sep 15 '23 13:09 alcohol