Skip to content

Commit c5b72f8

Browse files
authored
Merge pull request #318 from php-http/separate-deprecated-clients
separate clients overview, deprecate EOL guzzle 6 and clarify symfony client
2 parents a0da593 + 5d7c57b commit c5b72f8

File tree

3 files changed

+34
-8
lines changed

3 files changed

+34
-8
lines changed

clients.rst

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,41 @@ interface and forwarding the calls to an HTTP client not implementing the interf
2626
clients/react-adapter
2727
clients/zend-adapter
2828

29+
Current Clients and Adapters
30+
----------------------------
31+
32+
.. hint::
33+
34+
Modern PHP clients implement the ``PSR-18 HTTP Client`` standard. If you want to do synchronous requests, you don't
35+
need a PHP-HTTP adapter anymore. We keep providing the the curl client and a mock client for testing.
36+
37+
The adapters are still useful if you need the PHP-HTTP ``HttpAsyncClient``.
38+
2939
.. csv-table::
3040
:header: "Name", "Type", "Links", "Stats"
3141
:widths: 32, 15, 15, 38
3242

3343
"``php-http/curl-client``", "Client", ":doc:`Docs </clients/curl-client>`, `Repo <https://github.com/php-http/curl-client>`__", "|curl_version| |curl_downloads| "
34-
"``php-http/socket-client``", "Client", ":doc:`Docs </clients/socket-client>`, `Repo <https://github.com/php-http/socket-client>`__", "|socket_version| |socket_downloads| "
3544
"``php-http/mock-client``", "Client", ":doc:`Docs </clients/mock-client>`, `Repo <https://github.com/php-http/mock-client>`__", "|mock_version| |mock_downloads| "
3645
"``symfony/http-client``", "Client", ":doc:`Docs </clients/symfony-client>`, `Repo <https://github.com/symfony/http-client>`__", "|symfony_version| |symfony_downloads| "
3746
"``php-http/artax-adapter``", "Adapter", ":doc:`Docs </clients/artax-adapter>`, `Repo <https://github.com/php-http/artax-adapter>`__", "|artax_version| |artax_downloads| "
3847
"``php-http/buzz-adapter``", "Adapter", ":doc:`Docs </clients/buzz-adapter>`, `Repo <https://github.com/php-http/buzz-adapter>`__", "|buzz_version| |buzz_downloads| "
3948
"``php-http/cakephp-adapter``", "Adapter", ":doc:`Docs </clients/cakephp-adapter>`, `Repo <https://github.com/php-http/cakephp-adapter>`__", "|cakephp_version| |cakephp_downloads| "
40-
"``php-http/guzzle5-adapter``", "Adapter", ":doc:`Docs </clients/guzzle5-adapter>`, `Repo <https://github.com/php-http/guzzle5-adapter>`__", "|guzzle5_version| |guzzle5_downloads| "
41-
"``php-http/guzzle6-adapter``", "Adapter", ":doc:`Docs </clients/guzzle6-adapter>`, `Repo <https://github.com/php-http/guzzle6-adapter>`__", "|guzzle6_version| |guzzle6_downloads| "
4249
"``php-http/guzzle7-adapter``", "Adapter", ":doc:`Docs </clients/guzzle7-adapter>`, `Repo <https://github.com/php-http/guzzle7-adapter>`__", "|guzzle7_version| |guzzle7_downloads| "
4350
"``php-http/react-adapter``", "Adapter", ":doc:`Docs </clients/react-adapter>`, `Repo <https://github.com/php-http/react-adapter>`__", "|react_version| |react_downloads| "
51+
52+
Legacy Clients and Adapters
53+
---------------------------
54+
55+
These are not maintained anymore, but we keep documentation around for now. Please upgrade your applications to use a maintained client or adapter.
56+
57+
.. csv-table::
58+
:header: "Name", "Type", "Links", "Stats"
59+
:widths: 32, 15, 15, 38
60+
61+
"``php-http/socket-client``", "Client", ":doc:`Docs </clients/socket-client>`, `Repo <https://github.com/php-http/socket-client>`__", "|socket_version| |socket_downloads| "
62+
"``php-http/guzzle5-adapter``", "Adapter", ":doc:`Docs </clients/guzzle5-adapter>`, `Repo <https://github.com/php-http/guzzle5-adapter>`__", "|guzzle5_version| |guzzle5_downloads| "
63+
"``php-http/guzzle6-adapter``", "Adapter", ":doc:`Docs </clients/guzzle6-adapter>`, `Repo <https://github.com/php-http/guzzle6-adapter>`__", "|guzzle6_version| |guzzle6_downloads| "
4464
"``php-http/zend-adapter``", "Adapter", ":doc:`Docs </clients/zend-adapter>`, `Repo <https://github.com/php-http/zend-adapter>`__", "|zend_version| |zend_downloads| "
4565

4666
Composer Virtual Packages

clients/guzzle6-adapter.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
Guzzle 6 Adapter
2-
================
1+
Guzzle 6 Adapter (deprecated)
2+
=============================
33

44
An HTTPlug adapter for the `Guzzle 6 HTTP client`_.
55

6+
Guzzle 5 is `not maintained anymore`_. We recommend to upgrade to Guzzle version 7.
7+
68
Installation
79
------------
810

@@ -66,3 +68,4 @@ Or send asynchronous ones::
6668
.. include:: includes/further-reading-async.inc
6769

6870
.. _Guzzle 6 HTTP client: http://docs.guzzlephp.org/en/6.5/
71+
.. _not maintained anymore: https://github.com/guzzle/guzzle#version-guidance

clients/symfony-client.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
Symfony Client
22
==============
33

4-
An HTTPlug implementation from the `Symfony HttpClient`_.
4+
The Symfony HTTP client provides a ``HttplugClient`` class that implements the ``Http\Client\HttpAsyncClient``.
5+
Until Symfony 5.4, it also implemented the ``Http\Client\HttpClient``, newer versions implement the PSR-18
6+
``HttpClientInterface`` instead.
57

68
Installation
79
------------
810

9-
To install the Symfony client, run:
11+
The Symfony client does not depend on HTTPlug, but the ``HttplugClient`` does. To use the Symfony client with HTTPlug,
12+
you need to install both the client and HTTPlug with:
1013

1114
.. code-block:: bash
1215
13-
$ composer require symfony/http-client
16+
$ composer require symfony/http-client php-http/httplug
1417
1518
This client does not come with a PSR-7 implementation out of the box. If you do
1619
not require one, `discovery <../discovery>` will install `Nyholm PSR-7`_. If

0 commit comments

Comments
 (0)