Releases: saloonphp/saloon
Version v0.10.0
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.
What's Changed
- Feature | Authenticators by @Sammyjo20 in #48
Full Changelog: v0.9.2...v0.10.0
Version v0.9.2
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
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
Features
- Added Keychain authentication
Breaking Changes
- Renamed "setLoadedConnector" to "setConnector" on SaloonRequest.
Full Changelog: v0.8.3...v0.9.0
Version v0.8.3
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
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
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
- Added new 'CastsToDto' plugin by @Sammyjo20 in #40
Full Changelog: v0.8.0...v0.8.1
Version v0.8.0
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
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
Bug Fixes
- Update HasFormParams.php by @ronnievisser in #33
New Contributors
- @ronnievisser made their first contribution in #33
Full Changelog: v0.7.0...v0.7.1