Releases: zepgram/module-rest
Release 2.0.3
Release 2.0.2
Unset $body
and $query
for application/x-www-form-urlencoded
Release v1.1.5
Unset $body
for application/x-www-form-urlencoded
Release 2.0.1
Adding support for application/x-www-form-urlencoded
Release 1.1.4
Adding support for application/x-www-form-urlencoded
Release 2.0.0
What's Changed
Full Changelog: v1.1.3...v2.0.0
Pattern implementation
The module was a bit complexe to implement, so it has been simplified to provide more flexibility:
- ApiFactory has been removed
- ApiProvider can be directly injected to send a request
- ApiPool has replaced ApiFactory to fetch an ApiProvider.
Benefits
I've been working with this module for a while now, and one of the weakness was the ability to find the RequestAdapter
while running a request. You had to search in your di.xml for a reference on my_awesome_service
by yourself.
To simplify, instead of this:
$this->apiFactory->get('my_awesome_service', $data)->sendRequest();
Now we have this:
$this->apiPool->execute(MyAwesomeRequestAdapter::class, $data);
By doing this the developer and also the code reader are now able to easily find MyAwesomeRequestAdapter
class, which is basicly the service contract used by the ApiProvider
.
Aftermath
Now ApiProvider
and RequestAdapter
have a relation 1:1
Previously, you could use the same RequestAdapter for multiple ApiProvider (1:M), this is not the case anymore.
Breaking change
If you want to install v2.0.0 you must adapt your code.
Release 1.1.3
[v1.1.3] fix default group naming (which is general): the option to force logging for debug purposes was not available.
Release 1.0.5
[v1.0.5] fix default group naming (which is general): the option to force logging for debug purposes was not available.