Skip to content

6.0.0

Choose a tag to compare

@pepamartinec pepamartinec released this 20 Jul 13:00

Rebuilt on the shared keboola/php-api-client-base (transport, auth, retry, error handling). The public API still returns raw decoded arrays — the breaking change is how the clients are constructed.

Breaking changes

  • Constructor signature. Credentials and Manager now take the API base URL and token as explicit arguments, followed by named transport options, replacing the old (token, config[]) shape:
    new Credentials($baseUrl, $storageToken, backoffMaxTries: 10, ...);
    new Manager($baseUrl, $applicationToken, ...);
    config['url'] → $baseUrl, config['handler'] → requestHandler, config['backoffMaxTries'] → backoffMaxTries.
  • Minimum PHP is now 8.2.
  • Keboola\OAuthV2Api\Exception\ClientException now extends Keboola\ApiClientBase\Exception\ClientException (still an Exception; gains getStatusCode() / getResponseBody()).
  • Credentials::add() now requires the #data key (encrypted payload) instead of data.

New

  • Manager's application token is now optional — when omitted (or null), the client authenticates via the projected Kubernetes ServiceAccount token instead of X-KBC-ManageApiToken.

Preserved behavior

  • Retries (10 attempts) on 5xx and transport errors, 120s connect/request timeouts, and Accept: application/json on every request — matching the previous client.

Internals

  • Removed the hand-rolled Common transport; retry, timeouts, auth, and error normalization now come from keboola/php-api-client-base ^1.1.1.