Skip to content

v4.7.0

Choose a tag to compare

@stephangroen stephangroen released this 23 Sep 12:17
f7efd5b

Behaviour changes

Please check these when upgrading:

  • Lazy loading throws API errors. If loading a deferred property such as $invoice->SalesInvoiceLines fails (e.g. 429 or 401), an ApiException is now thrown. Before, the raw ['__deferred' => …] array was returned without any error. isset() on a deferred property triggers the load too, so it can also throw now. #697
  • download() throws ApiException. Item::download() and DocumentAttachment::download() now go through the new Connection::downloadFile(). They use your configured client and middleware, refresh expired tokens and track rate limits. Errors are thrown as ApiException instead of Guzzle exceptions. #697

Fixes

  • Deferred properties without a matching entity class (e.g. Expenses::$ExpenseLines) are returned as is, instead of causing a fatal Class not found error. #697
  • filter('Division eq …') restores the original division when the request fails. #697
  • Requests are signed whenever an access token is set, also when no refresh token or authorization code is set. #697

New

  • Connection::downloadFile(string $url): StreamInterface downloads files from absolute Exact Online urls. #697