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

Fix phpunit deprecations #311

Merged
merged 4 commits into from
Jul 11, 2024
Merged

Fix phpunit deprecations #311

merged 4 commits into from
Jul 11, 2024

Conversation

williamdes
Copy link
Contributor

They should be static since a long time, phpunit is now unhappy if not static

Question: should we bump phpunit and migrate to annotations ?

@coveralls
Copy link

Coverage Status

coverage: 99.872%. remained the same
when pulling 0aa9644 on williamdes:tests
into 753e964 on slimphp:master.

@williamdes williamdes changed the title Fix phpunit static provider Fix phpunit deprecations Jun 9, 2024
@williamdes
Copy link
Contributor Author

I pushed one last commit to address newer phpunit deprecations.

4 tests triggered 8 PHPUnit deprecations:

1) Slim\Tests\Psr7\ResponseTest::testWithStatusValidReasonPhraseObject
* MockBuilder::addMethods() is deprecated and will be removed in PHPUnit 12 without replacement.

* returnValue() is deprecated and will be removed in PHPUnit 12. Use $double->willReturn() instead of $double->will($this->returnValue())

/mnt/Dev/@debian/@wdes-packaging-team/php-slim-psr7/tests/ResponseTest.php:142

2) Slim\Tests\Psr7\UriTest::testWithHostValidObject
* MockBuilder::addMethods() is deprecated and will be removed in PHPUnit 12 without replacement.

* returnValue() is deprecated and will be removed in PHPUnit 12. Use $double->willReturn() instead of $double->will($this->returnValue())

/mnt/Dev/@debian/@wdes-packaging-team/php-slim-psr7/tests/UriTest.php:134

3) Slim\Tests\Psr7\UriTest::testWithQueryValidObject
* MockBuilder::addMethods() is deprecated and will be removed in PHPUnit 12 without replacement.

* returnValue() is deprecated and will be removed in PHPUnit 12. Use $double->willReturn() instead of $double->will($this->returnValue())

/mnt/Dev/@debian/@wdes-packaging-team/php-slim-psr7/tests/UriTest.php:299

4) Slim\Tests\Psr7\UriTest::testWithFragmentValidObject
* MockBuilder::addMethods() is deprecated and will be removed in PHPUnit 12 without replacement.

* returnValue() is deprecated and will be removed in PHPUnit 12. Use $double->willReturn() instead of $double->will($this->returnValue())

/mnt/Dev/@debian/@wdes-packaging-team/php-slim-psr7/tests/UriTest.php:351

@coveralls
Copy link

Coverage Status

coverage: 99.872%. remained the same
when pulling 382e260 on williamdes:tests
into 753e964 on slimphp:master.

@williamdes
Copy link
Contributor Author

hello @akrabat
what do you think about this PR and #310 ?

tests/TestObject.php Outdated Show resolved Hide resolved
@williamdes
Copy link
Contributor Author

I also did a bump for the workflows and removed the need to require a library to upload coverage, this will help when the code will get incompatible with the uploader module. Now you are sure to always be able to upload coverage.
See: https://github.com/coverallsapp/github-action

@williamdes williamdes requested a review from akrabat July 11, 2024 09:47
@coveralls
Copy link

Coverage Status

coverage: 99.893% (+0.02%) from 99.872%
when pulling b39ca1d on williamdes:tests
into 3123744 on slimphp:master.

@akrabat akrabat merged commit 1c7f012 into slimphp:master Jul 11, 2024
6 of 7 checks passed
@akrabat
Copy link
Member

akrabat commented Jul 11, 2024

Thanks.

@williamdes williamdes deleted the tests branch July 11, 2024 10:20
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