SDK-2780: PHP - Add support for new capture_type property on Static Liveness resources - php#416
Open
mehmet-yoti wants to merge 1 commit into
Conversation
…atic Liveness resources [php]
Contributor
Author
🤖 Claude Code ReviewCode Review FindingsThe change adds a CriticalNone MajorNone Minor
Nit
Verification
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for the new
capture_typeproperty returned on STATIC liveness resources when a Relying Business fetches a Doc Scan session. The property is exposed via a nullable getter onStaticLivenessResourceResponseand is backward compatible with older sessions that omit the field. The ZOOM liveness resource is intentionally left unchanged.Changes
src/DocScan/Session/Retrieve/StaticLivenessResourceResponse.php?string $captureTypeproperty mapped from the JSON keycapture_typein the constructor, defaulting tonullwhen absent (?? null).getCaptureType(): ?stringnoting the field is STATIC-specific and may be null/absent for older sessions.tests/DocScan/Session/Retrieve/StaticLivenessResourceResponseTest.phpgetCaptureType()returns the expected value whencapture_typeis present.getCaptureType()returnsnullwhen the field is absent.QA Test Steps
composer installto ensure dev dependencies are present.vendor/bin/phpunit tests/DocScan/Session/Retrieve/StaticLivenessResourceResponseTest.phpand confirm both test cases pass.new StaticLivenessResourceResponse(['liveness_type' => 'STATIC', 'capture_type' => 'someCaptureType', ...])and verifygetCaptureType()returns'someCaptureType'.new StaticLivenessResourceResponse([])and verifygetCaptureType()returnsnulland no exception is thrown.vendor/bin/phpunitand confirm all tests pass (997 tests, 2414 assertions). Confirm the ZOOM liveness resource behaviour is unchanged.vendor/bin/phpcs,vendor/bin/phpstan analyse, andvendor/bin/php-cs-fixer fix --dry-runand confirm all are clean.Notes
ZoomLivenessResourceResponse.php) was deliberately left unchanged ascapture_typeis specific to STATIC resources.Related Jira: SDK-2780
Auto-generated by Claude dynamic workflow