Skip to content

Releases: saloonphp/saloon

Version v0.7.0 - Mock Expectations

07 Feb 17:54
d81733b
Compare
Choose a tag to compare

New Features

You can now assert that Saloon has sent the correct response in your application! The following expectation methods have been added:

  • AssertSent (accepts request classes, closures and URL patterns)
  • AssertNotSent (inverse of assert sent)
  • AssertSentJson (accepts a class and an array to check both are equal)
  • AssertNothingSent
  • AssertSentCount

Here's how you can use it:

// Laravel (using Facade)

Saloon::assertSent(GetForgeServerRequest::class);

// Normal PHP

$mockClient->assertSent(GetForgeServerRequest::class);

What's Changed

Full Changelog: v0.6.6...v0.7.0

Version v0.6.6

05 Feb 15:26
69e2bff
Compare
Choose a tag to compare

New Features

Introducing a new way to use Saloon! You can now register your requests within your connector to use it just like an SDK. Take a look:

// Currently, the only way to make requests...

$request = new GetForgeServerRequest(serverId: 123456);
$response = $request->send();

// Introducing the new "SDK" API!

$connector = new ForgeConnector();
$request = $connector->getForgeServerRequest(serverId: 123456);
$response = $request->send();

// You can even use static methods...

$request = ForgeConnector::getForgeServerRequest(serverId: 123456);
$response = $request->send();

Click here to read more

What's Changed

Full Changelog: v0.6.5...v0.6.6

Version v0.6.5

02 Feb 17:40
b446974
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.6.4...v0.6.5

Version v0.6.4

30 Jan 11:47
c52235d
Compare
Choose a tag to compare

Fixes

  • Fixed bug where if you tried to add the AlwaysThrowsOnErrors trait to a connector it would fail.

Full Changelog: v0.6.3...v0.6.4

Version v0.6.3

30 Jan 00:56
Compare
Choose a tag to compare

Changes

  • Removed cookies() method from SaloonResponse

Full Changelog: v0.6.2...v0.6.3

Version v0.6.2

30 Jan 00:44
9bc00c6
Compare
Choose a tag to compare

Added

  • New getGuzzleException() to SaloonResponse
  • Previous exception to SaloonRequestException

Changed

  • Tidied up "Should Guess Status From Body" feature
  • Removed effectiveUri() and handlerStats() from response
  • Renamed getSaloonRequestOptions to getRequestOptions

Full Changelog: v0.6.1...v0.6.2

Version v0.6.1

29 Jan 10:20
Compare
Choose a tag to compare

What's Changed

  • Add default defineEndpoint in base SaloonRequest by @ajthinking in #21

New Contributors

Full Changelog: v0.6.0...v0.6.1

Version v0.6.0

28 Jan 22:56
d5bbca4
Compare
Choose a tag to compare

What's Changed

  • Removed requirement for HasQueryParams trait by @Sammyjo20 in #20

Full Changelog: v0.5.0...v0.6.0

Version v0.5.0

28 Jan 20:28
Compare
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
Compare
Choose a tag to compare

What's Changed

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