Skip to content
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

bump psalm to 4.1 #705

Merged
merged 2 commits into from
Nov 1, 2020
Merged

bump psalm to 4.1 #705

merged 2 commits into from
Nov 1, 2020

Conversation

orklah
Copy link
Contributor

@orklah orklah commented Nov 1, 2020

Hi,

This PR propose upgrading Psalm to 4.1 and fixing new issues along the way.

Note1: I couldn't find a way to upgrade psalm without obliterating the composer.lock first so it has been regenerated completely, I did so with composer 2, I don't know if it could cause an issue.

Note2: There is a future BC in this commit because I changed a parameter name that didn't match with the parent. Technically, this package doesn't support PHP8 so it should be fine to do it now.

Note3: I had to set phpstan version to 0.12.25 instead of ^0.12.25 to avoid updating it. There are errors in 0.12.26 that are related to covariance/contravariance with internal interfaces that can't be fixed and can't be added to ignore section of phpstan. I don't know what can be done about that.

@orklah orklah marked this pull request as draft November 1, 2020 09:57
@orklah orklah marked this pull request as ready for review November 1, 2020 12:54
Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@@ -352,9 +357,13 @@ private function callStaticMethod(array $args)
*/
private function callObjectMethod(object $object, array $args)
{
return Closure::bind(function ($object, string $methodName, array $methodArgs) {
$closure = Closure::bind(function ($object, string $methodName, array $methodArgs) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love me some shitty PHP core API :P

@Ocramius Ocramius added this to the 4.12.0 milestone Nov 1, 2020
@Ocramius Ocramius self-assigned this Nov 1, 2020
@Ocramius Ocramius added dependencies Pull requests that update a dependency file enhancement labels Nov 1, 2020
@Ocramius
Copy link
Member

Ocramius commented Nov 1, 2020

Hmm, MT failed due to:

Error: ] The minimum required MSI percentage should be 86%, but actual is       
         85.859097820578%. Improve your tests!                                  

I think we perhaps need roave/infection-static-analysis-plugin for this stuff

@orklah
Copy link
Contributor Author

orklah commented Nov 1, 2020

Yeah, seems like the bump of infection changed the result. The same can be seen here: #698

Maybe we could merge this and I can look at roave/infection-static-analysis-plugin in another PR?

@Ocramius
Copy link
Member

Ocramius commented Nov 1, 2020

I would prefer keeping the build green: all automations dependend on it

@orklah
Copy link
Contributor Author

orklah commented Nov 1, 2020

It's done. roave/infection-static-analysis-plugin mechanically augmented the score so the build is green.

Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

Metrics:
         Mutation Score Indicator (MSI): 88%
         Mutation Code Coverage: 93%
         Covered Code MSI: 94%

Thanks @orklah!

@Ocramius Ocramius merged commit 52ae7d6 into Roave:4.12.x Nov 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants