Skip to content

PAT-1866 Migrate sandboxes-service-api-client onto php-api-client-base#515

Merged
pepamartinec merged 3 commits into
mainfrom
pepa/common-api-lib-sandboxes
Jun 19, 2026
Merged

PAT-1866 Migrate sandboxes-service-api-client onto php-api-client-base#515
pepamartinec merged 3 commits into
mainfrom
pepa/common-api-lib-sandboxes

Conversation

@pepamartinec

Copy link
Copy Markdown
Contributor

Release Notes

https://linear.app/keboola/issue/PAT-1866/unified-api-client-base
Depends on #513

Migrates keboola/sandboxes-service-api-client onto keboola/php-api-client-base, removing its own copy of the transport/auth/retry/JSON plumbing. AppsApiClient and SandboxesApiClient now compose the base ApiClient and take the authenticator as a typed first-class argument (StorageApiTokenAuthenticator), so passing an invalid auth scheme is a type error (and a PHPStan error) rather than a runtime failure.

Key changes:

  • Delete the duplicated ApiClient / ApiClientConfiguration / RetryDecider / Json / ResponseModelInterface / Exception\ClientException / Authentication\StorageTokenAuthenticator; depend on the base via the monorepo path repository.
  • AppsApiClient / SandboxesApiClient constructors are now (string $baseUrl, StorageApiTokenAuthenticator $auth, ?ApiClientOptions $options = null); the model classes implement the base ResponseModelInterface.
  • Tests updated to the base namespaces; coverage retained (composer ci green, PHPStan level max, infection MSI 96%).

Plans for customer communication

None.

Impact analysis

Breaking change for callers constructing AppsApiClient / SandboxesApiClient: authentication is now a typed StorageApiTokenAuthenticator argument and client options use Keboola\ApiClientBase\ApiClientOptions. Released as a new major version. Cannot be released until php-api-client-base is published (see PR #513).

Change type

Refactoring

Justification

Deduplicate sandboxes-service-api-client onto the unified API client base (PAT-1866).

Deployment

Merge & automatic deploy.

Rollback plan

Revert of this PR.

Post release support plan

None.

@linear

linear Bot commented Jun 9, 2026

Copy link
Copy Markdown

PAT-1866

@pepamartinec pepamartinec force-pushed the pepa/common-api-lib-sandboxes branch 8 times, most recently from d8db592 to 2573040 Compare June 10, 2026 08:52
@pepamartinec pepamartinec marked this pull request as draft June 10, 2026 13:52
@pepamartinec pepamartinec force-pushed the pepa/common-api-lib-sandboxes branch 2 times, most recently from 485a784 to 2a94369 Compare June 15, 2026 07:35
Base automatically changed from pepa/common-api-lib to main June 15, 2026 07:54
@pepamartinec pepamartinec marked this pull request as ready for review June 15, 2026 14:06

@keboola-pr-reviewer-bot keboola-pr-reviewer-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: needs_human (risk 3/5) · profile ajda

reviewer returned a payload that failed validation.

@janvanicek janvanicek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@pepamartinec pepamartinec force-pushed the pepa/common-api-lib-sandboxes branch from 2a94369 to 9d6bae4 Compare June 17, 2026 08:44
@pepamartinec pepamartinec changed the base branch from main to pepa/PAT-1866_unifException June 17, 2026 08:45
Base automatically changed from pepa/PAT-1866_unifException to main June 17, 2026 10:15
Replace the duplicated transport/auth/retry/JSON plumbing with the shared
base lib. AppsApiClient and SandboxesApiClient take the storage token +
tunable options as flat constructor params (DI-friendly), build the
authenticator internally, unify models on the interface's fromResponseData
(fromArray dropped), and supply the service error format via a standalone
SandboxesErrorMessageResolver.
@pepamartinec pepamartinec force-pushed the pepa/common-api-lib-sandboxes branch from 9d6bae4 to 7dd3130 Compare June 19, 2026 08:37
@pepamartinec pepamartinec merged commit f078ef7 into main Jun 19, 2026
26 checks passed
@pepamartinec pepamartinec deleted the pepa/common-api-lib-sandboxes branch June 19, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants