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

PHP 8.1: code upgrade or #[\ReturnTypeWillChange] attribute needed. #150

Closed
lucaboesch opened this issue Jan 20, 2023 · 1 comment
Closed

Comments

@lucaboesch
Copy link

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 FMCorz closed this as completed in f4096db Jan 23, 2023
@FMCorz
Copy link
Owner

FMCorz commented Jan 23, 2023

Hi @lucaboesch, thank you for reporting this! We've patched the master branch.

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

No branches or pull requests

2 participants