Skip to content

Commit 31f7e8d

Browse files
authored
mention psr-18
1 parent 5072ccc commit 31f7e8d

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

index.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@ PHP-HTTP: standardized HTTP for PHP
77
:alt: HTTPlug Logo
88

99
PHP-HTTP is the next step in standardizing HTTP interaction for PHP packages.
10+
1011
It builds on top of PSR-7_, which defines interfaces for HTTP requests and
11-
responses. PSR-7 does not describe, however, the way you should create requests
12-
or send them. PHP-HTTP aims to fill that gap by offering an HTTP client
13-
interface: HTTPlug.
12+
responses. The HTTPlug HTTP client interface has been standardized in PSR-18_
13+
to define synchronous HTTP requests. When using a client that implements PSR-18,
14+
we recommend directly using PSR-18 and not HTTPlug nor our adapters.
15+
16+
However, PSR-18 does not define asynchronous requests. HTTPlug provides interfaces
17+
for those, but to do that also needs to define how :doc:`promises <components/promise>`
18+
are implemented.
1419

1520
PHP-HTTP has three goals:
1621

@@ -19,9 +24,8 @@ PHP-HTTP has three goals:
1924

2025
2. Provide good quality HTTP-related packages to the PHP community.
2126

22-
3. Over time, make HTTPlug a PHP Standards Recommendation (PSR) so that clients
23-
will directly implement the HTTPlug interface and our adapters are no longer
24-
needed.
27+
3. Now that PSR-18 exists, we miss a PSR for asynchronous requests. This is blocked
28+
by not having a PSR for promises.
2529

2630
HTTPlug
2731
-------

0 commit comments

Comments
 (0)