AlexaCRM/dynamics-webapi-toolkit

Deprecated return type for function offsetGet

sebasparola opened this issue · 2 comments

Describe the bug
For newer versions of PHP (>=8.1) the offsetGet functionality is giving deprecation warnings

To Reproduce
Create a new Entity
555

Expected behavior
No warning or Error

Additional context
Screenshot from 2024-04-03 11-11-05
Screenshot from 2024-04-03 11-15-39

Two possible solutions that I have tested and worked fine for this were:

  1. add the return type mixed for the function in the Entity class:
    public function offsetGet( $offset ) : mixed {

or

  1. add the overrride #[\ReturnTypeWillChange] annotation to the offsetGet function

Fixed in v4 branch. Please refer README.md for details.