Skip to content

Pre-1.0 polish: fix live-test order_id length, doc slip, dist hygiene - #9

Merged
loevgaard merged 1 commit into
1.xfrom
release-polish
Aug 10, 2026
Merged

Pre-1.0 polish: fix live-test order_id length, doc slip, dist hygiene#9
loevgaard merged 1 commit into
1.xfrom
release-polish

Conversation

@loevgaard

Copy link
Copy Markdown
Member

Summary

Small fixes from a full pre-release review of the library (architecture / tests / docs), clearing the last blockers flagged before tagging v1.0.0:

  • tests/Client/LiveClientTest.php — the live test generated a 22-character order_id ('sdk-probe-' + 12 hex chars), but Quickpay enforces a 4–20 character limit (live-verified, per the CreatePaymentRequest docblock). The test would have failed with a ValidationException on the next QUICKPAY_LIVE=1 run; it never surfaced because live tests are not run in CI. Now 'probe-' + 12 hex = 18 chars, with a comment pinning the constraint.
  • src/Callback/Callback.php — the class docblock referenced CallbackHandler::handleRequest(), which does not exist; the method is handleRaw().
  • .gitattributesexport-ignore for CLAUDE.md, /examples and /.env.local.example, so dist installs no longer ship the AI-instructions file and the whole e2e harness (Dockerfile included). Verified with git archive --worktree-attributes: the archive now contains only LICENSE, composer.json and src/.
  • .github/workflows/build.yaml — removed extensions: "${{ env.PHP_EXTENSIONS }}" from all six jobs; the env var was never defined anywhere, so the input always resolved to an empty string.

Test plan

  • vendor/bin/phpunit — 109 tests green (2 skipped = live-gated)
  • vendor/bin/phpstan analyse — level max, no errors
  • vendor/bin/ecs check — clean
  • Workflow YAML parses after the edit
  • git archive --worktree-attributes HEAD | tar -t — dist contains only LICENSE, composer.json, src/
  • Infection (local, pre-generated coverage): MSI 85%, mutation coverage 99%

Findings from a full pre-release review:

- LiveClientTest generated a 22-char order_id ('sdk-probe-' + 12 hex), but
  Quickpay enforces 4-20 chars, so the test would fail with a
  ValidationException when run with QUICKPAY_LIVE=1. Shorten to 'probe-' +
  12 hex = 18 chars.
- Callback's docblock referenced the nonexistent
  CallbackHandler::handleRequest(); the method is handleRaw().
- export-ignore CLAUDE.md, /examples and /.env.local.example so dist
  installs ship only LICENSE, composer.json and src/ (verified with
  git archive --worktree-attributes).
- Drop the extensions: "${{ env.PHP_EXTENSIONS }}" input from all six CI
  jobs - the env var was never defined, so it always resolved to an empty
  string.
@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.50%. Comparing base (18b4362) to head (9c9669e).

Additional details and impacted files
@@            Coverage Diff            @@
##                1.x       #9   +/-   ##
=========================================
  Coverage     98.50%   98.50%           
  Complexity      147      147           
=========================================
  Files            24       24           
  Lines           401      401           
=========================================
  Hits            395      395           
  Misses            6        6           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@loevgaard
loevgaard merged commit cc4b95c into 1.x Aug 10, 2026
35 checks passed
@loevgaard
loevgaard deleted the release-polish branch August 10, 2026 12:12
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