Releases: saloonphp/saloon
Releases · saloonphp/saloon
Version v0.7.0 - Mock Expectations
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
- Added new mock assertions by @Sammyjo20 in #31
Full Changelog: v0.6.6...v0.7.0
Version v0.6.6
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();
What's Changed
- New connector request API by @Sammyjo20 in #28
- Updated interfaces by @Sammyjo20 in #29
Full Changelog: v0.6.5...v0.6.6
Version v0.6.5
Version v0.6.4
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
Version v0.6.2
Added
- New
getGuzzleException()
to SaloonResponse - Previous exception to
SaloonRequestException
Changed
- Tidied up "Should Guess Status From Body" feature
- Removed
effectiveUri()
andhandlerStats()
from response - Renamed
getSaloonRequestOptions
togetRequestOptions
Full Changelog: v0.6.1...v0.6.2
Version v0.6.1
What's Changed
- Add default defineEndpoint in base SaloonRequest by @ajthinking in #21
New Contributors
- @ajthinking made their first contribution in #21
Full Changelog: v0.6.0...v0.6.1
Version v0.6.0
What's Changed
- Removed requirement for HasQueryParams trait by @Sammyjo20 in #20
Full Changelog: v0.5.0...v0.6.0
Version v0.5.0
New Features
- Added support to provide your own custom response classes by @yurirnascimento in #17 (Read more here)
New Contributors
- @yurirnascimento made their first contribution in #17
Full Changelog: v0.4.1...v0.5.0