Releases: PhpGt/Curl
Loosening of types for test frameworks
The only change in this minor patch release is a loosening of types on the CurlInterface, which allows for test frameworks to inject their own CurlInterface implementation - the purpose of this library is to help test endpoints without requiring an internet connection, so this is a vital feature.
What's Changed
Full Changelog: v3.1.0...v3.1.1
March 2023 minor release
This minor release was made following on from the documentation being finalised, after everything has been tested with real usage.
The only functionality introduced/changed is in regards to the header/write function callback usage - now, if there is an existing write function, a new one will not be added when adding a Curl to a CurlMulti.
Read about concurrent curl requests here: https://github.com/PhpGt/Curl/wiki/Concurrent-Curl-requests
Test coverage
This minor patch release doesn't change any functionality - instead it unit tests the internal implementation of the classes of the system. There are a couple of tests that are only checking that an exception hasn't been thrown, but most of the tests deliver genuine quality assurance for the dependent projects of this library.
September 2022 release
CI and type safety improvements
We're one step closer to a CI environment fully hosted within Github Actions now, with PHPUnit and PHPStan tests being run within Actions. Codesniffer is planned soon too.
PHP 8 compatibility is made possible thanks to an updated dependency tree.
GetInfo's return type loosened
Currently the return type of Curl::getInfo is set to be integer, but actually there may be any sort of mixed types returned, depending on the info requested.
Destructing objects after using callback functions
Certain Curl callback functions such as the Header, Progress, Read and Write functions can cause the underlying Curl resource to destruct. This is by the design of Curl, but if this happens while using the OOP wrapper that this repository provides, an error is raised when the object destructors fire, because the underlying resource is no longer present.
CurlObjectLookup
Along with the Curl object type being standardised more thoroughly, this release introduces the CurlObjectLookup
class, which stores a reference to all initialised Curl
objects. The purpose of this is to allow referencing the original Curl object from a native curl handle, which is a requirement when using CurlMulti functionality.
Buffered output
This release has a backwards-incompatible change of buffering the output when CURLOPT_RETURNTRANSFER is not set.
All curl output is buffered, rather than echoed to STDOUT. The buffer can be read using either the output
or outputJson
functions, allowing for much easier JSON webservice consumption.
Single namespace used
All classes are now within the same namespace, Gt\Curl
. This makes using the library much simpler.