Skip to content

Fix the deprecation warnings #45

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

Merged
merged 3 commits into from
Dec 18, 2019
Merged

Conversation

gmponos
Copy link
Contributor

@gmponos gmponos commented Dec 15, 2019

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? yes
License MIT

What's in this PR?

@Nyholm I started this PR from your branch. I hope you haven't already been working on it..

The solution is not a very much sophisticated one.. but I gues for now it can do..

@gmponos gmponos changed the title Fix hte deprecation warnings Fix the deprecation warnings Dec 15, 2019
@gmponos gmponos marked this pull request as ready for review December 15, 2019 18:45
Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

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

this looks like the right solution to me, totally sophisticated enough :-D

most builds are failing to install dependencies. that is not a change of your PR, but it would be good to see the changes build on a few more versions... any chance you could check what is going on with installing the clients?

@@ -103,6 +102,7 @@ public function testSendWithInvalidUri()
$this->defaultHeaders
);

$this->expectException(\Psr\Http\Client\NetworkExceptionInterface::class);
Copy link
Contributor

Choose a reason for hiding this comment

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

please use the classes used for these

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@gmponos
Copy link
Contributor Author

gmponos commented Dec 17, 2019

@dbu checking the initial PR of @Nyholm I think the BC trait is an overkill.. Since Tobias is adding the return types a new major version is needed.. Because of the return types we must drop support for PhpUnit 7 and move to 8, hence the trait is useless.

The alternative would be to apply the sf BC trait here as well: https://github.com/symfony/symfony/blob/v4.4.1/src/Symfony/Bundle/FrameworkBundle/Test/ForwardCompatTestTrait.php

that is not a change of your PR, but it would be good to see the changes build on a few more versions

I think most of them are failing due to this:
v2.0.0...master#diff-94fd4ca79483c08112a4c7d0e167582dR30

My suggestion would be to finish here.. tag a new version and then check the clients.

@dbu
Copy link
Contributor

dbu commented Dec 18, 2019

right, master of client-integration-tests is already designated as version 3 and i think with adding the return type declarations to setUp and tearDown, we should do a new major version of the integration tests.

if we don't support phpunit 7 anymore, clients can't be tested with php 7.1. therefore i think your trait makes sense and we can merge this as is, and clients using the test suite can update to version 3 at their own pace. the forward compatibility trait only avoids the BC break for people using phpunit 7 and overwriting one of our tests setUp method. narrowing the return value to void when working with phpunit 7 works fine.

do you want to use the expectedException? is there anything else to consider before we merge this into the feature branch?

@gmponos
Copy link
Contributor Author

gmponos commented Dec 18, 2019

ok then.. done..

@dbu dbu merged commit 6d527ff into php-http:phpunit8 Dec 18, 2019
@gmponos gmponos deleted the phpunit8-deprecations branch December 18, 2019 16:52
Nyholm added a commit that referenced this pull request Sep 30, 2020
* Support PHPUnit 8

* Added return types

* Show Guzzle tests

* minor

* Fix the deprecation warnings (#45)

* Fix the deprecation warnings

* Provide a bc way for assertStringContainsString

Co-authored-by: Mponos George <gmponos@gmail.com>
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.

2 participants