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

Support yoast/phpunit-polyfills v2 #206

Merged
merged 3 commits into from
May 20, 2024
Merged

Support yoast/phpunit-polyfills v2 #206

merged 3 commits into from
May 20, 2024

Conversation

swissspidy
Copy link
Member

@swissspidy swissspidy commented May 17, 2024

Not sure if we'll have problems in other packages with renaming test files...

Fixes #205

@swissspidy swissspidy marked this pull request as ready for review May 17, 2024 10:44
@swissspidy swissspidy requested a review from a team as a code owner May 17, 2024 10:44
Copy link
Member

@thelovekesh thelovekesh left a comment

Choose a reason for hiding this comment

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

LGTM!

@ernilambar
Copy link
Member

I tested this PR is i18n command and got following output. Tests are running good but there are some deprecations. Not sure this is related to this PR or not. Pasting here for the info.

PHPUnit 10.5.20 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.2.18
Configuration: /Users/nilambarsharma/Code/kli/i18n-command/phpunit.xml.dist

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD..........                   47 / 47 (100%)

Time: 00:00.156, Memory: 10.00 MB

There was 1 PHPUnit test runner deprecation:

1) Your XML configuration validates against a deprecated schema. Migrate your XML configuration using "--migrate-configuration"!

--

2 tests triggered 2 PHPUnit deprecations:

1) WP_CLI\I18n\Tests\IterableCodeExtractorTest::test_gets_file_extension_correctly
Data Provider method WP_CLI\I18n\Tests\IterableCodeExtractorTest::file_extension_extract_provider() is not static

/Users/nilambarsharma/Code/kli/i18n-command/tests/IterableCodeExtractorTest.php:229

2) WP_CLI\I18n\Tests\IterableCodeExtractorTest::test_matches_file_extensions_correctly
Data Provider method WP_CLI\I18n\Tests\IterableCodeExtractorTest::file_extensions_matches_provider() is not static

/Users/nilambarsharma/Code/kli/i18n-command/tests/IterableCodeExtractorTest.php:244

OK, but there were issues!
Tests: 47, Assertions: 60, Deprecations: 33.

@swissspidy swissspidy changed the title Support yoast/phpunit-polyfills Support yoast/phpunit-polyfills v2 May 20, 2024
@swissspidy
Copy link
Member Author

Thanks!
Yeah those deprecations need to be fixed in that command. They are triggered when using newer PHPUnit versions, which this PR enables.

@swissspidy swissspidy merged commit 0c5c2e9 into main May 20, 2024
69 checks passed
@swissspidy swissspidy deleted the fix/205-polyfills branch May 20, 2024 08:04
@swissspidy swissspidy added this to the 4.3.0 milestone May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update to yoast/phpunit-polyfills 2.0
3 participants