Skip to content

Use ClientInterface in MockFactory #430

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
May 17, 2023
Merged

Conversation

ruudk
Copy link
Contributor

@ruudk ruudk commented May 17, 2023

Q A
Bug fix? no
New feature? no
BC breaks? ?
Deprecations? no
Related tickets
Documentation
License MIT

What's in this PR?

HttpClient is deprecated in favor of ClientInterface. By accepting ClientInterface in the MockFactory, developers can transition to the ClientInterface.

HttpClient is deprecated in favor of ClientInterface.
By accepting ClientInterface in the MockFactory, developers can transition to
the ClientInterface.
@ruudk
Copy link
Contributor Author

ruudk commented May 17, 2023

@dbu is this the way to do it?

Copy link
Collaborator

@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.

thanks. this should be BC because the httplug client implements the psr interface.

@ruudk
Copy link
Contributor Author

ruudk commented May 17, 2023

What about the failing test? Do I need to fix more?

@dbu
Copy link
Collaborator

dbu commented May 17, 2023

it mentions buzz. is that the problem? the buzz adapter is quite outdated and i want to deprecate it.

can you try to raise the minimum requirement on php-http/httplug ? if i understand the problem correctly, we can then no longer install with buzz-adapter (because that is pulling us down to such a low version of httplug that we don't implement the psr interface yet). we should raise that minimum requirement anyways to avoid invalid situations (check what version has httplug client interface start extend the psr interface).

if this is indeed the problem, i suggest we remove buzz from that matrix entry (or if thats the only difference to other builds just remove the whole matrix entry)

ruudk added 2 commits May 17, 2023 10:22
It's not compatible with HTTPlug 2.0
@ruudk
Copy link
Contributor Author

ruudk commented May 17, 2023

@dbu done, raised version and removed buzz-adapter from the matrix.

@@ -44,10 +44,6 @@ jobs:
php-version: "8.2"
symfony-deprecations-helper: "weak"

# Test with httplug 1.x clients
Copy link
Collaborator

Choose a reason for hiding this comment

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

ah, httplug 1 was the problem in general. agree to drop that.

@dbu dbu merged commit 83bc157 into php-http:1.x May 17, 2023
@ruudk ruudk deleted the mock-client-interface branch May 17, 2023 09:40
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