SDK-2615: PHP - Support configuration for IDV shortened flow - php#414
Conversation
🤖 Claude Code ReviewCode Review FindingsSummaryThe branch extends CriticalNone. Major
Minor
Nit
|
There was a problem hiding this comment.
Pull request overview
Adds first-class support for configuring the Doc Scan IDV “shortened flow” suppressed screens via named constants and a convenience lookup API, with accompanying unit tests.
Changes:
- Introduces
SuppressedScreenconstants for supported suppressible screen identifiers. - Adds
SdkConfig::isScreenSuppressed()for strict lookup against configured suppressed screens. - Extends
SdkConfigBuilderTestto cover constants and lookup behavior (including null/empty and case-sensitivity).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/DocScan/Session/Create/SuppressedScreen.php |
Adds a constants holder for supported suppressed_screens identifiers. |
src/DocScan/Session/Create/SdkConfig.php |
Adds isScreenSuppressed() helper for checking suppression configuration. |
tests/DocScan/Session/Create/SdkConfigBuilderTest.php |
Adds test coverage for constants and isScreenSuppressed() behavior. |
.claude/settings.local.json |
Adds local Claude tooling permissions configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { | ||
| "permissions": { | ||
| "allow": [ | ||
| "Bash(git rev-list *)", | ||
| "Bash(./vendor/bin/phpunit --filter 'SdkConfigBuilderTest|SessionConfigurationResponseTest')", | ||
| "Bash(git config *)" | ||
| ] | ||
| } | ||
| } |
There was a problem hiding this comment.
This adds a settings.local.json file that appears to be a machine-/developer-local Claude CLI permissions config (including allowed Bash commands). Committing a *.local.* file can unintentionally share local tooling permissions across the team and into releases (e.g., source distributions). Consider removing this from version control and adding it to .gitignore, or committing a non-local template (e.g. settings.json.example) with the minimal required permissions instead.
| { | |
| "permissions": { | |
| "allow": [ | |
| "Bash(git rev-list *)", | |
| "Bash(./vendor/bin/phpunit --filter 'SdkConfigBuilderTest|SessionConfigurationResponseTest')", | |
| "Bash(git config *)" | |
| ] | |
| } | |
| } | |
| {} |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { | ||
| "permissions": { | ||
| "allow": [ | ||
| "Bash(git rev-list *)", | ||
| "Bash(./vendor/bin/phpunit --filter 'SdkConfigBuilderTest|SessionConfigurationResponseTest')", | ||
| "Bash(git config *)" | ||
| ] | ||
| } | ||
| } |
Summary
Adds first-class support for configuring the IDV shortened flow by introducing a
SuppressedScreenconstants class and a convenienceisScreenSuppressed()lookup onSdkConfig. This lets integrators suppress specific IDV screens (e.g. education, requirements, flow completion) using named constants rather than raw strings, and inspect whether a given screen has been suppressed.Changes
src/DocScan/Session/Create/SuppressedScreen.php(new): Defines string constants for the supported suppressible screens:ID_DOCUMENT_EDUCATION,ID_DOCUMENT_REQUIREMENTS,SUPPLEMENTARY_DOCUMENT_EDUCATION,ZOOM_LIVENESS_EDUCATION,STATIC_LIVENESS_EDUCATION,FACE_CAPTURE_EDUCATION,FLOW_COMPLETION.src/DocScan/Session/Create/SdkConfig.php: AddsisScreenSuppressed(string $screenIdentifier): bool, which returnsfalsewhen no suppressed screens are configured and otherwise performs a strictin_arraycheck against the configured list.tests/DocScan/Session/Create/SdkConfigBuilderTest.php: Adds coverage for empty-array suppressed screens, building with the new constants, constant value assertions, andisScreenSuppressedacross matched, unmatched, null, and case-sensitivity scenarios..claude/settings.local.json: Local tooling settings update (not production code).QA Test Steps
composer installto install dependencies.vendor/bin/phpunit— confirm all tests pass, including the new ones inSdkConfigBuilderTest.vendor/bin/phpunit --filter SdkConfigBuilderTest tests/DocScan/Session/Create/SdkConfigBuilderTest.php.SdkConfigviaSdkConfigBuilder::withSuppressedScreens([SuppressedScreen::ID_DOCUMENT_EDUCATION, SuppressedScreen::FLOW_COMPLETION])and assertgetSuppressedScreens()returns exactly those values, and thatisScreenSuppressed(SuppressedScreen::ID_DOCUMENT_EDUCATION)returnstrue.withSuppressedScreen(SuppressedScreen::ID_DOCUMENT_EDUCATION)and verifyisScreenSuppressed(SuppressedScreen::ID_DOCUMENT_EDUCATION)istruewhileisScreenSuppressed(SuppressedScreen::FLOW_COMPLETION)isfalse.withSuppressedScreens([])builds successfully andgetSuppressedScreens()returns[].SdkConfigBuilderwith no suppressed-screen call produces anSdkConfigwhereisScreenSuppressed(...)returnsfalsefor every constant (null-safe behavior).SuppressedScreen::ID_DOCUMENT_EDUCATION, callisScreenSuppressed('id_document_education')and verify it returnsfalse(strict comparison).SuppressedScreen::*constant string value matches its identifier name exactly (e.g.SuppressedScreen::FLOW_COMPLETION === 'FLOW_COMPLETION').SdkConfigwithout calling any suppressed-screens setter and confirmjsonSerialize()output does not contain asuppressed_screensproperty (pre-existing behavior retained).withSuppressedScreens([...])and verify thesdk_config.suppressed_screensarray in the outbound request payload is unchanged from prior releases.composer testor any CI command defined incomposer.json) and confirm no new warnings.Notes
SuppressedScreenclass is a plain constants holder (no enum) to stay consistent with the PHP version floor of the SDK and with existing constants-style classes in the codebase.isScreenSuppressed()is case-sensitive by design, matching the exact string values the backend expects.SdkConfigBuilderpublic API or the JSON wire format — this is purely additive (new class + new read helper), so existing integrations continue to work unchanged..claude/settings.local.jsonis an ancillary tooling file; reviewers may want to confirm whether it should be committed or gitignored per project convention.Related Jira: SDK-2615
Auto-generated by n8n + Claude CLI