microsoft / o365-moodle

Office 365 and Azure Active Directory plugins for Moodle
GNU General Public License v3.0
180 stars 136 forks source link

moodle-auth_oidc - Creation of dynamic property is deprecated with PHP 8.2+ #2594

Open steveorulez opened 3 months ago

steveorulez commented 3 months ago

Hello, we just upgraded Moodle from 4.1 to 4.3 with the latest auth_oidc plugin installed (4.3.3 - 2023100915) on a test server and this message appear with debugging activated on DEVELOPER when you visit https://moodlesiste.com/auth/oidc/

Deprecated: Creation of dynamic property auth_oidc\oidcclient::$scope is deprecated in /path/auth/oidc/classes/oidcclient.php on line 93

There is no blocking error, just a message.

It's the same issue that was fixed #2547

have a nice day christian

steveorulez commented 3 months ago

An easy fix is to declare it at the beginning of the class oidcclient on line 57 of the file classes/oidcclient.php

/* @var string The scope. / protected $scope;

christian

rafaelatopen commented 3 months ago

Hello, the same deprecation can be found in blocks/microsoft/block_microsoft.php line 43. Reporting here instead of creating a new issue to avoid spamming. Thx.