Skip to content

Deprecated HttpClient service, added ClientInterface #426

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

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.

# unreleased

- Deprecated `Http\Client\HttpClient` in favor of `Psr\Http\Client\ClientInterface` (#425).
- Added `Psr\Http\Client\ClientInterface` service (#425).

# 1.27.1 - 2023-03-03

- Added `: void` to `Collector::reset` to avoid PHP warning.
Expand Down
5 changes: 4 additions & 1 deletion src/Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@
<service id="httplug.client.default" class="Http\Client\HttpClient">
<factory class="Http\Discovery\HttpClientDiscovery" method="find" />
</service>
<service id="Http\Client\HttpClient" alias="httplug.client" public="false" />
<service id="Http\Client\HttpClient" alias="httplug.client" public="false">
<deprecated package="php-http/httplug-bundle" version="1.28" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<deprecated package="php-http/httplug-bundle" version="1.28" />
<deprecated package="php-http/httplug-bundle" version="1.28">The "%service_id%" service is deprecated in favor of using PSR-7 Psr\Http\Client\ClientInterface directly</deprecated>

</service>
<service id="Psr\Http\Client\ClientInterface" alias="httplug.client" public="false" />

<!-- Discovery for PSR-18 -->
<service id="httplug.psr18_client.default" class="Psr\Http\Client\ClientInterface">
Expand Down