Repository navigation
SDK-2798: Go - Remove the API for AML check in connect - php - #421
mehmet-yoti wants to merge 2 commits into
Conversation
BREAKING CHANGE: Remove `performAmlCheck()` from `YotiClient` and all supporting AML models (`Aml\Address`, `Aml\Country`, `Aml\Profile`, `Aml\Result`, `Aml\Service`, `Exception\AmlException`), tests, and example scripts, as the Connect AML service has been shut down server-side. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Code Review FindingsThis PR removes the decommissioned AML check API from the PHP SDK. The removal is clean and complete. Two findings surfaced during review. Minor
The new $rawPublicKey = file_get_contents(TestData::PEM_AUTH_KEY);
$this->publicKey = "-----BEGIN PUBLIC KEY-----\n" .
chunk_split($rawPublicKey, 64, "\n") .
"-----END PUBLIC KEY-----\n";
$privKey = openssl_pkey_get_private(file_get_contents(TestData::PEM_FILE));
$this->publicKey = openssl_pkey_get_details($privKey)['key'];This is self-consistent (the private and public key are provably the same key pair), needs no separate Nit
Lines 118-120 of the now-deleted $expectedAttributes = [
self::ON_PEP_LIST_KEY,
self::ON_WATCH_LIST_KEY,
self::ON_WATCH_LIST_KEY, // duplicated; should have been ON_FRAUD_LIST_KEY
];
Critical / MajorNone. Reviewed the diff across 🤖 Generated with Claude Code |
|
Closing — this ticket (SDK-2798, titled "Go - ...") was mistakenly processed against the php SDK due to a static |
Summary
Removes the decommissioned AML (Anti-Money Laundering) check API from the PHP SDK. The Connect AML service (
/aml-checkendpoint) has been decommissioned and all related code, tests, sample data, and examples have been deleted. TheperformAmlCheck()method has been removed fromYotiClientand supporting tests have been refactored accordingly.Changes
src/Aml/— Deleted entire directory:Address.php,Country.php,Profile.php,Result.php,Service.phpsrc/Exception/AmlException.php— Deleted AML-specific exception classsrc/YotiClient.php— RemovedperformAmlCheck()method and related AML importsexamples/aml-check/— Deleted entire example directory (.env.dist,.gitignore,README.md,aml-check-usa.php,aml-check.php,bootstrap.php,composer.json,keys/.gitignore)tests/Aml/— Deleted all AML unit tests:AddressTest.php,CountryTest.php,ProfileTest.php,ResultTest.php,ServiceTest.phptests/sample-data/— Deletedaml-check-private-key.pem,aml-check-public-key.pem,aml-check-result.jsontests/YotiClientTest.php— Removed AML-related test methods; refactoredassertApiUrlStartsWith()to usecreateShareUrl()tests/Http/RequestSignerTest.php— Replaced AML key references withPEM_FILEtests/Profile/ActivityDetailsTest.php— Removed unused AML importtests/TestData.php— Removed AML test constantsQA Test Steps
websdk-auto/SDK-2798-php-remove-the-api-for-aml-check-in-connect, then runcomposer install.vendor/bin/phpunit— all 952 tests should pass with no failures or errors.src/Aml/directory no longer exists andYotiClienthas noperformAmlCheck()method.composer dump-autoloadand confirm no references toYoti\AmlorYoti\Exception\AmlExceptionin the generated autoload map.vendor/bin/php-cs-fixer fix --dry-runto confirm no code style regressions.grep -r 'AmlCheck\|AmlException\|performAmlCheck\|aml-check' src/ tests/ examples/) — confirm no remaining references.Notes
YotiClientmethods were made.examples/aml-check/directory and all its contents have been removed; any existing integrations relying on this example should be updated.Related Jira: SDK-2798
Auto-generated by Claude dynamic workflow