fingerprint-pro-server-api-php-sdk
fingerprint-pro-server-api-php-sdk copied to clipboard
refactor: introduce async method and wip inline types
I made the changes based on your comments. Please resolve all previous unresolved comments if you think they are resolved @TheUnderScorer.
There is one more thing that you need to fix.
Sealed is not working actually. Maybe it was broken before, maybe stronger types highlighted the problem and finally broke it.
What you need to do:
- run
sealed_results_example.php. 1.1.getEnvwill not work, you'll need to add
1.2 you will get error$dotenv = Dotenv\Dotenv::createImmutable(__DIR__); $dotenv->safeLoad();PHP Fatal error: Uncaught TypeError: Fingerprint\ServerAPI\Model\EventResponse::getProducts(): Return value must be of type Fingerprint\ServerAPI\Model\ProductsResponse, array returned - You will need to change the wrong deserialization (
new EventResponse($data)) to the correct one (check how it done for API request) (I made it for python here) - Add tests for it (be sure that the will fail with current code)
This PR will create a major release :rocket:
5.0.0 (2024-08-21)
⚠ BREAKING CHANGES
- API Methods now throws
SerializationException - API Methods returns tuple instead of models
- API Methods removed other than
getModel - Upgraded minimum php version to 8.1
- Request logic is rewritten, Upgraded minimum php version to 8.1
Features
- add support for validating webhook signatures inter-768 (6a4cbd6)
- change api to return tuple instead of serialized model (62e4ad3)
- introduce rawResponse for getVisits and getEvent methods (9b01ba6)
- introduce serialization exception (bfea23a)
- only generate models and docs from swagger codegen (26e984f)
- remove raw response and introduce with http info (ce2fedf)
- rewrite request logic (0016822)
- upgrade min php version to 8 (5698871)
Bug Fixes
- serializaiton problem on sealed results (29cb26c)