Convert Guzzle requests to curl commands with namshi/cuzzle

The other day the namshi/cuzzle PHP pacakge came in really handy. This library let’s you dump a Guzzle request to a cURL command for debug and log purposes This way I could test some things on the CLI, and easily share these tests with all my colleagues, including those without PHP installed. use Namshi\Cuzzle\Formatter\CurlFormatter; use …

Guzzle: Fake a Response using a `MockHandler`

Now this will come in handy for testing: ⚗️ One of the most common integrations developers struggle to test is Guzzle. Fortunately, it has a `MockHandler` you can set up to return predefined responses. Since it uses the existing `Client` and `Response` objects, there's no need to change your implementation. — Jason McCreary (@gonedark) December …

Avoid Guzzle 6.5.0 (aka How to fix “Use of undefined constant INTL_IDNA_VARIANT_UTS46” on CentOS 6)

There’s a bug in Guzzle 6.5.0 in which it does not play nice with systems that have an older ICU library (which PHP’s Intl extension uses). CentOS 6 for example ships with a very old ICU version, without any (offical) means of updating it. The bug should be fixed in (the unreleased) Guzzle 6.5.1. It …