Skip to content

feat: update PHP SDK to v2.0.1 and route analytics to the dedicated ingest service - #23

Merged
tomasstark merged 2 commits into
betafrom
chore/update-php-sdk-2.0.1
Aug 27, 2026
Merged

tomasstark merged 2 commits into
betafrom
chore/update-php-sdk-2.0.1

Conversation

@tomasstark

@tomasstark tomasstark commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

This PR updates the Supertab Connect PHP SDK from 1.4.0-beta.10 to the stable v2.0.1 release, aligns the plugin's analytics delivery with the SDK's new dedicated ingest service, and adds a legacy mapping for pre-2.0 enforcement mode values so the beta line can ship as 1.3.0 without a breaking change.

Context

SDK v2.0.0 consolidated the 1.4.0-beta series into a stable release. Its one breaking change (the EnforcementMode rename to OBSERVE/ENFORCE) landed before beta.10, so the plugin already uses the new enum cases and needs no code migration for it.

However, sites configured against plugin 1.2.x may define SUPERTAB_CONNECT_ENFORCEMENT_MODE with the old values (soft/strict). Without a mapping, those values would be silently ignored after upgrading and a site enforcing with strict would fail open to observe.

The other behavioral change since beta.10 is that the SDK now sends analytics to the dedicated ingest service (https://ingest-connect.supertab.co) instead of the API host. The plugin's queued dispatch path builds the ingest URL itself, so it had to follow.

Key Changes

  • Bump getsupertab/connect-sdk-php to ^2.0.1 in composer.json and composer.lock.
  • Map legacy enforcement mode values in Plugin::map_enforcement_mode_value(): soft resolves to OBSERVE, strict resolves to ENFORCE, current values pass through unchanged. Covered by new unit tests.
  • Add a SUPERTAB_CONNECT_ANALYTICS_BASE_URL constant, following the existing environment pattern (prod: ingest-connect.supertab.co, sbx: ingest-connect.sbx.supertab.co), overridable in wp-config.php like the API base URL.
  • Pass analyticsBaseUrl to the SupertabConnect constructor so the SDK's default (non-queued) transport honors the environment override.
  • Point Analytics_Dispatcher's batch POST and inline dispatch at the new analytics constant instead of the API base URL.
  • Update test stubs and dispatcher test assertions accordingly.

All checks pass: lint, phpcs, phpstan, and the PHPUnit suite (122 tests).

@tomasstark
tomasstark merged commit 90b6c69 into beta Aug 27, 2026
5 checks passed
github-actions Bot pushed a commit that referenced this pull request Aug 27, 2026
# [1.3.0-beta.15](v1.3.0-beta.14...v1.3.0-beta.15) (2026-08-27)

### Features

* update PHP SDK to v2.0.1 and route analytics to the dedicated ingest service ([#23](#23)) ([90b6c69](90b6c69))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.3.0-beta.15 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@tomasstark tomasstark mentioned this pull request Aug 27, 2026
github-actions Bot pushed a commit that referenced this pull request Aug 27, 2026
# [1.3.0](v1.2.2...v1.3.0) (2026-08-27)

### Bug Fixes

* add vertical spacing between the CAP and analytics checkboxes ([a12bf0c](a12bf0c))
* copy for enabling agent & bot classification ([817fd05](817fd05))
* defer the analytics flush schedule check to init ([#22](#22)) ([8322a84](8322a84))
* resolve Authorization via the SDK's getallheaders() fallback in Status_Handler ([#19](#19)) ([d515452](d515452)), closes [getsupertab/connect-sdk-php#24](getsupertab/connect-sdk-php#24)
* send SDK user-agent on plugin HTTP requests ([#14](#14)) ([9891e03](9891e03))

### Features

* batch analytics events via custom-table buffer and hourly flush ([#17](#17)) ([d125194](d125194))
* bump connect-sdk-php to 1.4.0-beta.1 for testing ([719cb58](719cb58))
* enable bot traffic analytics by default ([#11](#11)) ([2aaa352](2aaa352))
* make analytics opt-in via a settings checkbox ([#21](#21)) ([9df74f0](9df74f0))
* queue analytics dispatch via Action Scheduler / WP-Cron ([#15](#15)) ([5397d46](5397d46))
* serve /.well-known/supertab/status self-report endpoint ([#18](#18)) ([d44a344](d44a344)), closes [getsupertab/connect-sdk-typescript#40](getsupertab/connect-sdk-typescript#40)
* update getsupertab/connect-sdk-php to 1.4.0-beta.5 ([#13](#13)) ([ca12083](ca12083))
* update PHP SDK to v1.4.0-beta.6 ([b01f004](b01f004))
* update PHP SDK to v2.0.1 and route analytics to the dedicated ingest service ([#23](#23)) ([90b6c69](90b6c69))
* updated PHP SDK ([390cb54](390cb54))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant