onfido-php icon indicating copy to clipboard operation
onfido-php copied to clipboard

Adds PHP declarative types on the signatures of ArrayAccess and JsonSerializable interface for PHP 8.1

Open adilk2005 opened this issue 2 years ago • 1 comments

PHP 8.1 is now throwing Deprecated notices when any of it's interfaces are used and the types are not declared as they are in it's current interface definition.

https://github.com/onfido/api-php-client/issues/33 This issue was opened about 4 months ago. I was facing the same problem when I ran my unit test. When I looked into it, I found the simple solution and am sending it here. If you add this fix it will cause the deprecated notice to go away.

I tested with PHP 7.4 on my local and it doesn't seem to cause any problems on it either as this is not going to be enforced till PHP 9.0.

adilk2005 avatar Nov 22 '22 12:11 adilk2005

Hi, it's been a couple of days and haven't heard anything from your end.

If this isn't an acceptable solution, no worries. Can you give me some feedback? I'm always looking to learn and improve my approach.

Thanks

By the way, this is my work Git account i'm messaging from.

williamAdil avatar Nov 26 '22 13:11 williamAdil

@adilk2005 @williamAdil Thanks for your contribution but unfortunately we can't accept this change. This is due to the fact that the code of this library is autogenerated, so we need to go for another kind of solution to not override these changes every time. Let us follow up with this need in ticket #33 you've created.

dvacca avatar Jan 31 '23 14:01 dvacca

@ChrisBullOz @DavidMealha-Onfido The Open API generator 7.1.0 released a fix for these deprecations. Can we get a new release using the latest open api generator version?

dmason30 avatar Jan 26 '24 14:01 dmason30