Skip to content

Modernize the SDK for OWA 1.14 (1.1.0) - #21

Merged
padams merged 2 commits into
masterfrom
modernize/owa-1.14
Oct 21, 2026
Merged

padams merged 2 commits into
masterfrom
modernize/owa-1.14

Conversation

@padams

@padams padams commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Brings the SDK in line with OWA 1.14.0 and adds tests and CI.

Changes

Area Change
Requirements PHP 8.2+, OWA 1.14+. Guzzle removed; OwaSdk\Http\Transport uses curl, or PHP streams without ext-curl
Cookies & sessions Same layout as the 1.14 JS tracker: JSON stores with sv/cdh, escape() encoding, per-site owa_s_<siteId> written only after log.php accepts the request. Legacy owa_s / owa_b are migrated
IP / UA / language Forwarded as X-Forwarded-For, User-Agent, Accept-Language headers. New setIpAddress() / setUserAgent()
Ecommerce Billing address sent as ct_country / ct_state / ct_city (1.14 discards the old names)
REST API RFC 3986 query encoding in the signed URL; OWA_AUTH_KEY env no longer replaced by the api key; ~/.owa/credentials [defaults] read; no credentials in failure logs
Do Not Track DNT: 1 is respected by default (respect_do_not_track)
Tooling PHPUnit 10.5, PHPStan level 6, CI on PHP 8.2 / 8.3 / 8.4 plus a no-curl leg

sdk::VERSION is 1.1.0. Callers should note: tracking methods return bool, and getHttpClient() returns a Transport. See "Upgrading from 1.0.x" in the README.

Issues

Fixes #17, fixes #18, fixes #19, fixes #20. Supersedes #16 (Guzzle is no longer a dependency).

Verification

  • 71 tests, PHPStan level 6 clean, locally.
  • Live: two page views and a transaction sent to a 1.14.0 install; all accepted, and the second page view continued the first one's session.

padams added 2 commits October 21, 2026 12:25
- Require PHP 8.2. Drop Guzzle for a small curl/streams transport.
- Track with the 1.14 JS tracker's cookie layout: JSON stores with sv/cdh,
  escape() encoding, per-site session store owa_s_<siteId> written only after
  log.php accepts the request, owa_s/owa_b migrated.
- Forward the visitor's User-Agent, X-Forwarded-For and Accept-Language as
  headers; log.php ignores them as event properties (#20, #18).
- Send billing address as ct_country/ct_state/ct_city.
- Sign REST URLs with RFC 3986 encoding; read OWA_AUTH_KEY and the
  ~/.owa/credentials [defaults] section correctly; keep credentials out of
  failure logs.
- Fix PHP 8.2 dynamic property deprecations (#17) and nps staying at "0".
- Respect DNT: 1 by default, as the JS tracker does.
- Add PHPUnit and PHPStan (level 6), and CI on PHP 8.2-8.4 with a no-curl leg.
- Rewrite the README, including credentials setup (#19).
@padams
padams merged commit b8748d1 into master Oct 21, 2026
4 checks passed
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.

How to pass the ip address to the sdk tracker object How to make it work with OWA Geolocation not tracked Deprecated code warnings

1 participant