Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation notice with php 8.1 : return type incompatibility #442

Open
monnardj opened this issue Dec 20, 2024 · 0 comments
Open

Deprecation notice with php 8.1 : return type incompatibility #442

monnardj opened this issue Dec 20, 2024 · 0 comments

Comments

@monnardj
Copy link

monnardj commented Dec 20, 2024

In PHP 8.1, a new return type compatibility rule has been introduced for interfaces. Several methods of MultiRequestSubResult class in /local/kaltura/API/KalturaClientBase.php class do not respect the signature expected by the ArrayAccess interface.

This produces notices when they are called, such as :
Deprecated: Return type of MultiRequestSubResult::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 .../KalturaClientBase.php on line 51

In future versions of php, these notices might become fatal errors. Thus, the method definitions offsetExists, offsetGet, offsetSet, offsetUnset should be adapted according to the definition of ArrayAccess interface in https://www.php.net/manual/en/class.arrayaccess.php.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant