fingerprintjs / fingerprint-pro-server-api-php-sdk

PHP SDK for Fingerprint Pro Server API
MIT License
19 stars 5 forks source link

Get rid of ArrayAccess methods warnings #78

Closed JuroUhlar closed 1 year ago

JuroUhlar commented 1 year ago

Running run_checks.php you get a lot of these warnings:

Deprecated: Return type of Fingerprint\ServerAPI\Model\SignalResponseTor::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jurajuhlar/Documents/Code/php-server-sdk/src/Model/SignalResponseTor.php on line 271
PHP Deprecated:  Return type of Fingerprint\ServerAPI\Model\SignalResponseTor::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/jurajuhlar/Documents/Code/php-server-sdk/src/Model/SignalResponseTor.php on line 284

They might be suppressed now at the script level but they are there. We might be able to get rid of them as the message suggest by adjusting our generation templates, here is the related generator issue:

https://github.com/swagger-api/swagger-codegen/issues/11820

JuroUhlar commented 1 year ago

Solved in https://github.com/fingerprintjs/fingerprint-pro-server-api-php-sdk/pull/72/files Closing :)