Skip to content

Add component identity to the /status self-report payload - #22

Merged
tomasstark merged 1 commit into
mainfrom
feat/status-component-identity
Jul 14, 2026
Merged

Add component identity to the /status self-report payload#22
tomasstark merged 1 commit into
mainfrom
feat/status-component-identity

Conversation

@tomasstark

Copy link
Copy Markdown
Contributor

This PR adds a self-describing component: { kind: "php-sdk", version } to the /.well-known/supertab/status payload — the PHP counterpart of getsupertab/connect-sdk-typescript#40.

Context

The status payload reported only sdkVersion, which tells the backend nothing about which package a deployment actually updates from. The backend's per-component version resolver (laterpay/supertab-connect#1094) maps component.kind to the right registry and label; a bare sdkVersion payload gets legacy-shimmed to ts-sdk and checked against npm — the wrong registry for a Packagist-installed PHP deployment. (The WordPress plugin builds its own status payload with kind: "wordpress-plugin"getsupertab/connect-wp#18 — so this field covers standalone PHP deployments and the plain-permalink WP fallback where the SDK answers the probe itself.)

Key Changes

  • handleStatusRequest() now emits component: { kind: "php-sdk", version: HttpClient::resolveVersion() } alongside the unchanged sdkVersion.
  • Test asserting the component identity and that its version matches sdkVersion; README payload example updated.

Additive and backward-compatible — older backends ignore the new field, and the backend degrades unknown kinds to "show version, no nudge" until it wires a php-sdk resolver. No version bump or release here; that stays a separate step.

@tomasstark
tomasstark merged commit fefb1ef into main Jul 14, 2026
5 checks passed
@tomasstark
tomasstark deleted the feat/status-component-identity branch July 14, 2026 08:41
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.

1 participant