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

chore: update phpunit 9 => 10 and psalm 4 => 5 #368

Merged
merged 1 commit into from
Jul 28, 2023
Merged

chore: update phpunit 9 => 10 and psalm 4 => 5 #368

merged 1 commit into from
Jul 28, 2023

Conversation

Chris53897
Copy link
Contributor

The Element is new in PhpUnit 10.2.

The removed attributes in phpunit.xml.dist are the default ones.

Copy link
Owner

@egulias egulias left a comment

Choose a reason for hiding this comment

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

Hey, thanks for the PR.
Can you explain the reasoning behind all the changes to ´static´?
I don't think they bring any meaningful improvement.

@@ -64,7 +64,7 @@ public function invalidUTF8CharsProvider()
return $chars;
}

protected function utf8Chr($code_point)
protected static function utf8Chr($code_point)
Copy link
Owner

Choose a reason for hiding this comment

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

Can you explain the reasoning behind this change please?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PhpUnit 10 is deprecating data providers that are not static.
sebastianbergmann/phpunit@9caafe2
https://docs.phpunit.de/en/10.0/writing-tests-for-phpunit.html#data-providers

This will trigger warnings in phpunit testruns. Some CI break with warnings.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This particular change is needed to make the data provider static, that is calling this function.

@egulias egulias merged commit 36233f5 into egulias:4.x Jul 28, 2023
@egulias
Copy link
Owner

egulias commented Jul 28, 2023

Thanks!

@Chris53897 Chris53897 deleted the feature/phpunit-10 branch August 2, 2023 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants