Skip to content

Make Attestation fields nullable to match TU API spec; add CI#1

Merged
oojacoboo merged 3 commits into
masterfrom
fix/attestation-nullable-fields
Apr 30, 2026
Merged

Make Attestation fields nullable to match TU API spec; add CI#1
oojacoboo merged 3 commits into
masterfrom
fix/attestation-nullable-fields

Conversation

@oojacoboo

Copy link
Copy Markdown
Contributor

Summary

  • Production bug fix: Per the TransUnion ShareAble v3 OpenAPI spec, Attestation.name, Attestation.legalText, and Attestation.additionalInformation are all nullable. Our DTO had them as non-nullable string (with Assert\NotBlank on name/legalText), so any attestation with a null/missing field from TU would throw TypeError during deserialization.
  • Defensive guards: AttestationGroup::fromArray now tolerates missing or null attestations keys, and AttestationGroup::toArray no longer iterates over null arrays.
  • CI workflow: New .github/workflows/ci.yml runs phpunit --testsuite unit on every push/PR against master. Switches the coding-standard-php repository URL to HTTPS so the workflow can install dev deps without SSH auth (the package is now public).

Test plan

  • vendor/bin/phpunit --testsuite unit — 66 tests pass (10 new across AttestationTest + new AttestationGroupTest)
  • New tests cover: null name/legalText/additionalInformation, missing attestations key in fromArray, null attestations value, empty toArray, false-affirmative responses
  • Verify CI workflow runs green once this PR is open

Related

  • Pairs with the api repo's hotfix/attestation-affirmative-required branch which fixes the manager-facing UI that hardcoded true for every attestation response

- Add .github/workflows/ci.yml running phpunit --testsuite unit on PHP 8.4
  for every push and PR against master
- Switch coding-standard-php repository URL from SSH to HTTPS now that the
  package is public, so composer install works in CI without auth
Triggered only by workflow_dispatch so PR runs never burn TransUnion sandbox
quota and secrets aren't exposed to fork PRs.  Required repository secrets:
TU_SHAREABLE_URL, TU_SHAREABLE_CLIENT_ID, TU_SHAREABLE_API_KEY_ONE,
TU_SHAREABLE_API_KEY_TWO.
@oojacoboo
oojacoboo merged commit d35ed68 into master Apr 30, 2026
4 checks passed
@oojacoboo
oojacoboo deleted the fix/attestation-nullable-fields branch April 30, 2026 05:00
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