fingerprint-pro-server-api-php-sdk icon indicating copy to clipboard operation
fingerprint-pro-server-api-php-sdk copied to clipboard

refactor: introduce async method and wip inline types

Open Orkuncakilkaya opened this issue 1 year ago • 3 comments

Orkuncakilkaya avatar Jul 30 '24 18:07 Orkuncakilkaya

I made the changes based on your comments. Please resolve all previous unresolved comments if you think they are resolved @TheUnderScorer.

Orkuncakilkaya avatar Aug 13 '24 14:08 Orkuncakilkaya

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:

  1. run sealed_results_example.php. 1.1. getEnv will not work, you'll need to add
    $dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
    $dotenv->safeLoad();
    
    1.2 you will get error PHP Fatal error: Uncaught TypeError: Fingerprint\ServerAPI\Model\EventResponse::getProducts(): Return value must be of type Fingerprint\ServerAPI\Model\ProductsResponse, array returned
  2. 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)
  3. Add tests for it (be sure that the will fail with current code)

ilfa avatar Aug 13 '24 17:08 ilfa

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)

github-actions[bot] avatar Aug 21 '24 09:08 github-actions[bot]