Skip to content

Releases: saloonphp/saloon

Version v0.5.0

28 Jan 20:28

Choose a tag to compare

New Features

New Contributors

Full Changelog: v0.4.1...v0.5.0

Version v0.4.1

23 Jan 22:50
9b767ff

Choose a tag to compare

What's Changed

Full Changelog: v0.4.0...v0.4.1

Version v0.4.0 - Mocking 🚀

23 Jan 20:44
927abca

Choose a tag to compare

Mocking for Laravel/SDKs

This release includes mocking for both Laravel and PHP applications. See more in the README. Here's a little snippet:

$mockClient = new SaloonMockClient();
$mockClient->addResponse(new MockResponse($data, 200, $headers));
$mockClient->addResponse(new MockResponse($data, 500, $headers));

$response = (new SaloonRequest)->send($mockClient); // 200
$response = (new SaloonRequest)->send($mockClient); // 500

Here's an example of how it could be implemented

$sdk = new ForgeSdk($token, $saloonMockClient);
$sdk->getServers(); // Internally sends $saloonRequest->send($this->mockClient);

Other Changes

  • Added new HasBody plugin for custom request data like XML.
  • Added Macroable trait to SaloonResponse
  • Created a AlwaysThrowsOnErrors plugin
  • Renamed setConfigVariable to setConfig
  • Bug fixes and tidy ups

What's Changed

New Contributors

Full Changelog: v0.3.1...v0.4.0

Version v0.3.1

20 Jan 19:21
f88da6c

Choose a tag to compare

Fixes

  • Now if you don't provide an endpoint in the request, Saloon won't add a trailing slash to the base url (#6)
  • Moved license file to root directory (#8)

Version v0.3.0 - Guzzle Handlers 🎉

17 Jan 19:09
feb7b6c

Choose a tag to compare

Changes

  • Added support for Guzzle handlers to customise the Guzzle request/response before it is sent out 🔥
  • Set the stage for a caching plugin (coming soon...)
  • Improved interceptors
  • Added "boot" method to request/connector to easily add functionality

Breaking changes

  • Removed old interceptors pattern (not documented)

Version 0.2.0

15 Jan 11:48
5afa628

Choose a tag to compare

Changes

  • Re-written the way formData and queryParams are processed
  • formData and queryParams can now be added to the base connector

Version 0.1.0

15 Jan 02:10
88c0c84

Choose a tag to compare

Changes

  • Modified request/response interceptors to use SaloonRequest and SaloonResponse
  • Added basic functionality tests
  • Updated Request Manager to work better with interceptors

Fixes

  • Error handling

v0.0.4

14 Jan 19:04

Choose a tag to compare

Changes

  • Removed old "Requesti" name

Added Licenses

14 Jan 18:51

Choose a tag to compare

v0.0.3

License

v0.0.2

14 Jan 18:36

Choose a tag to compare

  • Fixed composer.json