Skip to content

Releases: saloonphp/saloon

Version v0.10.0

11 Apr 20:40
Compare
Choose a tag to compare

Authenticators!

This release introduces a new feature into Saloon, authenticators. Easily authenticate with your API integrations using the built in methods or create your own custom authenticators.

Click here to read more

What's Changed

Full Changelog: v0.9.2...v0.10.0

Version v0.9.2

10 Apr 21:38
cc895fe
Compare
Choose a tag to compare

What's Changed

  • Added new send and request methods to the connector
  • Changed return type of cast method
  • Moved make back out from trait to improve readability

Full Changelog: v0.9.1...v0.9.2

Version v0.9.1

03 Mar 00:01
Compare
Choose a tag to compare

Changes

  • Fixed an issue where the "default" method on the Keychain did not return an instance of the class.

Full Changelog: v0.9.0...v0.9.1

Version v0.9.0

02 Mar 23:51
Compare
Choose a tag to compare

Features

  • Added Keychain authentication

Breaking Changes

  • Renamed "setLoadedConnector" to "setConnector" on SaloonRequest.

Full Changelog: v0.8.3...v0.9.0

Version v0.8.3

02 Mar 23:46
Compare
Choose a tag to compare

What's Changed

  • Fixed an issue trying to convert an unsuccesful response to a dto by @Sammyjo20 in #44

Full Changelog: v0.8.2...v0.8.3

Version v0.8.2

28 Feb 21:45
17132a7
Compare
Choose a tag to compare

What's Changed

  • Changed DTO property type to protected by @Sammyjo20 in #42
  • Changed "getStream" to "stream" on the SaloonResponse to be more consistent.

Full Changelog: v0.8.1...v0.8.2

Version v0.8.1

28 Feb 21:19
f2927aa
Compare
Choose a tag to compare

This release introduces a first-party way to cast directly to a DTO of your choice.

Firstly, add the "CastsToDto" trait to your request. After that, you need to add the "castToDto" method on the request. This should return your DTO with the data populated inside of it.

public function castToDto(SaloonResponse $response): object
{
    return User::fromSaloon($response);
}

After your request has been sent, you can use the dto method on the response to retrieve your DTO.

$response = UserRequest::make()->send();
$dto = $response->dto(); // Data\User

What's Changed

Full Changelog: v0.8.0...v0.8.1

Version v0.8.0

28 Feb 19:15
bcdaa14
Compare
Choose a tag to compare

The biggest release in terms of changes for Saloon, be careful there are quite a number of breaking changes as Saloon leads up to v1.0 so keep an eye out for them below.

Features

  • Added “getStream” to Saloon Response
  • Added “xml” method to Saloon Response which will cast a XML response to a SimpleXMLElement
  • Added the current request being processed to the “boot” methods on the connector and request. (Breaking Change)
  • Added new authentication methods
    • withBasicAuth (for username/password auth)
    • withDigestAuth (for username/password auth with a digest)
    • withToken (for Authentication: Bearer tokens)
  • Added a default connection timeout of 10 seconds and default request timeout of 30 seconds (Breaking Change)
  • Added a new “make” static method on a request and connector.
  • Added the current request being processed to the “boot” method of your plugins.

Changes

  • Removed unused “connectorHasQueryParamsTrait” method
  • Removed the requirement to add the word “feature” on the end of plugins (Breaking Change)
  • The “defineXMLBody” method on the HasXMLBody plugin is now abstract
  • The namespace for all plugins has changed from "Sammyjo20\Saloon\Traits\Features" to “Sammyjo20\Saloon\Traits\Plugins" (Breaking Change)
  • All built in plugins now have "SaloonRequest $request" added to their boot methods.

Breaking Changes

  • Plugins no longer have the word “feature” at the end of them on their boot method. You should rename your boot methods of your plugins to address this. For example “bootHasJsonBodyFeature” is now “bootHasJsonBody”.
  • Saloon now has a default connection timeout of 10 seconds and a request timeout of 30 seconds, if you need a larger timeout, you should overwrite this by using the HasTimeout plugin.
  • The “boot” method on your connectors and requests now have the current processing request being passed in, you should specify this if you are using the “boot” method on either your connector or request.
  • The namespace for all plugins has changed from "Sammyjo20\Saloon\Features\Plugins" to “Sammyjo20\Saloon\Traits\Plugins"
  • All built in plugins now have "SaloonRequest $request" added to their boot methods. If you are extending any of these plugins, you should reflect this change too.

Full Changelog: v0.7.2...v0.8.0

Version v0.7.2

11 Feb 16:25
48bde48
Compare
Choose a tag to compare

What's Changed

  • Fixed an issue where assertSent would not check against the full history by @Sammyjo20 in #34

Full Changelog: v0.7.1...v0.7.2

Version v0.7.1

11 Feb 10:40
d8d4c44
Compare
Choose a tag to compare

Bug Fixes

New Contributors

Full Changelog: v0.7.0...v0.7.1