You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow up on 5796
Requests 2.0.11 contains a number of PHP 8.4 related fixes, so an update is warranted.
Includes updated certificates bundle.
Note: I've done the update manually as the `utils/install-requests.sh` script doesn't work on Windows. Wouldn't be a bad idea if someone on *nix ran the script over this commit to verify that my manual update had the same result.
I'd also like to suggest maybe creating a GH Actions workflow which automates keeping Requests up to date by:
0. Running as a weekly cron job.
1. Checking the latest released version via the GH API.
2. If it doesn't match the version in `utils/install-requests.sh`, update the version nr in the script.
3. Run the script.
4. Commit the changes and create a pull request for the update.
The pull request can still be (manually) tweaked if needed and/or rejected, but at least it takes the "we need to remember to do this" out of the equation.
Refs:
* https://github.com/WordPress/Requests/releases
Note: this fix constitutes an, albeit small, breaking change to the signature of the `Cookie::parse_from_headers()` method.
20
+
Classes which extend the `Cookie` class and overload the `parse_from_headers()` method should be updated for the new method signature.
21
+
Additionally, if code calling the `Cookie::parse_from_headers()` method would be wrapped in a `try - catch` to catch a potential PHP `TypeError` (PHP 7.0+) or `Exception` (PHP < 7.0) for when invalid data was passed as the `$origin` parameter, this code will need to be updated to now also catch a potential `WpOrg\Requests\Exception\InvalidArgumentException`.
22
+
As due diligence could not find any classes which would be affected by this BC-break, we have deemed it acceptable to include this fix in the 2.0.11 release.
Copy file name to clipboardExpand all lines: bundle/rmccue/requests/README.md
+19-1Lines changed: 19 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,11 +151,29 @@ If you'd like to run a single set of tests, specify just the name:
151
151
$ phpunit Transport/cURL
152
152
```
153
153
154
+
Requests and PSR-7/PSR-18
155
+
-------------------------
156
+
157
+
[PSR-7][psr-7] describes common interfaces for representing HTTP messages.
158
+
[PSR-18][psr-18] describes a common interface for sending HTTP requests and receiving HTTP responses.
159
+
160
+
Both PSR-7 as well as PSR-18 were created after Requests' conception.
161
+
At this time, there is no intention to add a native PSR-7/PSR-18 implementation to the Requests library.
162
+
163
+
However, the amazing [Artur Weigandt][art4] has created a [package][requests-psr-18], which allows you to use Requests as a PSR-7 compatible PSR-18 HTTP Client.
164
+
If you are interested in a PSR-7/PSR-18 compatible version of Requests, we highly recommend you check out [this package][requests-psr-18].
0 commit comments