Closed nesh-ua closed 2 years ago
Hi @nesh-ua could you let us know what version of Laravel you are using, and also another example please of the error you are getting. Thank you
Now i am using Laravel 8. But i am planing to upgrade it to 9. My version of php is 8.1. I think these problems is not related on Laravel.
Thanks, yep I think you're right. We're on the case now.
I have encountered the same message. The issue is unrelated to Laravel and any consuming app running php 8.1 will encounter them.
PHP Fatal error: During inheritance of ArrayAccess: Uncaught PHPUnit\Framework\Exception: Deprecated: Return type of XeroAPI\XeroPHP\Models\Accounting\Item::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vendor/xeroapi/xero-php-oauth2/lib/Models/Accounting/Item.php:777
when this gets fixed I would suggest using #[\ReturnTypeWillChange]
as changing the method signature to match ArrayAccess::offsetExists(mixed $offset): bool
would bump the minimum supported php version number to php 8.0 due to the mixed type.
Quick update #271 should resolve this, just doing a bit more testing before releasing 🙂
SDK you're using (please complete the following information):
Describe the bug I upgraded version of php to 8.1. And now i have warning like this (there are another warnings like this): Return type of XeroAPI\XeroPHP\Models\Accounting\Payment::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/laravelapp/vendor/xeroapi/xero-php-oauth2/lib/Models/Accounting/Payment.php on line 1213
Are you planing to fix these warnings?