PHP 8.1: code upgrade or #[\ReturnTypeWillChange] attribute needed.
lucaboesch opened this issue · 1 comments
lucaboesch commented
Hi!
On Moodle 4.1.1. / PHP 8.1 your plugin triggers a warning which interferes with automated Behat testing:
Unknown error type: During inheritance of JsonSerializable: Uncaught Exception: Unknown error type: Return type of block_xp\local\xp\algo_levels_info::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /…/blocks/xp/classes/local/xp/algo_levels_info.php on line 161 in /…/lib/behat/lib.php:157
Best,
Luca
FMCorz commented
Hi @lucaboesch, thank you for reporting this! We've patched the master branch.