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

Use ClientInterface instead of HttpClient #442

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

glaubinix
Copy link

Q A
Bug fix? no
New feature? no
BC breaks? yes
Deprecations? no
Related tickets addresses one more item of #439 (comment)
Documentation if this is a new feature, link to pull request in https://github.com/php-http/documentation that adds relevant documentation
License MIT

What's in this PR?

Instead of using the deprecated HttpClient interface, this now uses ClientInterface everywhere

Why?

The old interface is deprecated

Checklist

  • Updated CHANGELOG.md to describe BC breaks / deprecations | new feature | bugfix
  • Documentation pull request created (if not simply a bugfix)

To Do

  • I am not sure if keeping around both httplug.client.default and httplug.psr18_client.default is OK or if this will cause any issues? If we can keep them around, then it might be easier for people to update the library without running into issues.

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 a lot!

i have one small nitpick on the naming in the test.

tests/Unit/Collector/ProfileCustomClientTest.php Outdated Show resolved Hide resolved
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.

@dbu dbu merged commit cd98d08 into php-http:2.x Nov 21, 2023
12 checks passed
@glaubinix glaubinix deleted the client-interface branch November 21, 2023 16:33
@glaubinix
Copy link
Author

Yes, that was on my list. How do you generally handle cases that are different in versions, e.g. removed config keys?

@dbu
Copy link
Collaborator

dbu commented Nov 21, 2023

generally it would be best if we had a separate documentation for each major version, but the doc is for all the various components together so no meaningful versioning is possible.

i would just remove obsolete things, and have ..versionadded:: 2.0 notes for new things (see for example components/client-common.rst)

mostly people will read the doc when setting things up. for BC breaks the changelog of the corresponding repository is the right place.

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.

None yet

2 participants