Skip to content

Version v0.8.0

Compare
Choose a tag to compare
@Sammyjo20 Sammyjo20 released this 28 Feb 19:15
bcdaa14

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