MDL-78144 libraries: Added #[AllowDynamicProperties] to ltiprovider
To prevent the PHP 8.2 warning about Dynamic Properties' deprecation, the #[\AllowDynamicProperties] attributes was added.
This commit is contained in:
@@ -64,3 +64,12 @@ In case of any changes we may need to update
|
||||
enrol/lti/classes/data_connector.php
|
||||
enrol/lti/db/install.xml
|
||||
enrol/lti/db/upgrade.php
|
||||
|
||||
* MDL-78144 PHP 8.2 compliance.
|
||||
To temporarily prevent the PHP 8.2 warning about the deprecation of dynamic properties,
|
||||
the #[\AllowDynamicProperties] attribute was added on top of the classes.
|
||||
Below is a handy command to add the attribute above the class line:
|
||||
```
|
||||
cd lib/ltiprovider/src
|
||||
for file in `find . -name '*.php' `; do sed -i '/^class /i #[\\AllowDynamicProperties]' $file; done
|
||||
```
|
||||
@@ -14,6 +14,7 @@ require_once($CFG->libdir . '/filelib.php');
|
||||
* @version 3.0.0
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class HTTPMessage
|
||||
{
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace IMSGlobal\LTI\OAuth;
|
||||
* @version 2008-08-04
|
||||
* @license https://opensource.org/licenses/MIT The MIT License
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class OAuthConsumer {
|
||||
|
||||
public $key;
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace IMSGlobal\LTI\OAuth;
|
||||
* @version 2008-08-04
|
||||
* @license https://opensource.org/licenses/MIT The MIT License
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class OAuthDataStore {
|
||||
function lookup_consumer($consumer_key) {
|
||||
// implement me
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace IMSGlobal\LTI\OAuth;
|
||||
* @version 2008-08-04
|
||||
* @license https://opensource.org/licenses/MIT The MIT License
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class OAuthException extends \Exception {
|
||||
// pass
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace IMSGlobal\LTI\OAuth;
|
||||
* @version 2008-08-04
|
||||
* @license https://opensource.org/licenses/MIT The MIT License
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class OAuthRequest {
|
||||
|
||||
protected $parameters;
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace IMSGlobal\LTI\OAuth;
|
||||
* @version 2008-08-04
|
||||
* @license https://opensource.org/licenses/MIT The MIT License
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class OAuthServer {
|
||||
|
||||
protected $timestamp_threshold = 300; // in seconds, five minutes
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace IMSGlobal\LTI\OAuth;
|
||||
* character (ASCII code 38) even if empty.
|
||||
* - Chapter 9.2 ("HMAC-SHA1")
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class OAuthSignatureMethod_HMAC_SHA1 extends OAuthSignatureMethod {
|
||||
|
||||
function get_name() {
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace IMSGlobal\LTI\OAuth;
|
||||
* encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an '&'
|
||||
* character (ASCII code 38) even if empty.
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class OAuthSignatureMethod_HMAC_SHA256 extends OAuthSignatureMethod {
|
||||
|
||||
function get_name() {
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace IMSGlobal\LTI\OAuth;
|
||||
* @version 2008-08-04
|
||||
* @license https://opensource.org/licenses/MIT The MIT License
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class OAuthToken {
|
||||
|
||||
// access tokens and request tokens
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace IMSGlobal\LTI\OAuth;
|
||||
* @version 2008-08-04
|
||||
* @license https://opensource.org/licenses/MIT The MIT License
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class OAuthUtil {
|
||||
|
||||
public static function urlencode_rfc3986($input) {
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace IMSGlobal\LTI\Profile;
|
||||
* @version 3.0.0
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class Item
|
||||
{
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace IMSGlobal\LTI\Profile;
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
|
||||
#[\AllowDynamicProperties]
|
||||
class Message
|
||||
{
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace IMSGlobal\LTI\Profile;
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
|
||||
#[\AllowDynamicProperties]
|
||||
class ResourceHandler
|
||||
{
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace IMSGlobal\LTI\Profile;
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
|
||||
#[\AllowDynamicProperties]
|
||||
class ServiceDefinition
|
||||
{
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace IMSGlobal\LTI\ToolProvider;
|
||||
* @version 3.0.2
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class ConsumerNonce
|
||||
{
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace IMSGlobal\LTI\ToolProvider;
|
||||
* @version 3.0.2
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class ContentItem
|
||||
{
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace IMSGlobal\LTI\ToolProvider;
|
||||
* @version 3.0.2
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class ContentItemImage
|
||||
{
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace IMSGlobal\LTI\ToolProvider;
|
||||
* @version 3.0.2
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class ContentItemPlacement
|
||||
{
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ use IMSGlobal\LTI\ToolProvider\Service;
|
||||
* @version 3.0.2
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class Context
|
||||
{
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ use PDO;
|
||||
* @version 3.0.0
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class DataConnector
|
||||
{
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ use IMSGlobal\LTI\ToolProvider\User;
|
||||
###
|
||||
|
||||
|
||||
#[\AllowDynamicProperties]
|
||||
class DataConnector_mysql extends DataConnector
|
||||
{
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ use PDO;
|
||||
*/
|
||||
|
||||
|
||||
#[\AllowDynamicProperties]
|
||||
class DataConnector_pdo extends DataConnector
|
||||
{
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ use PDO;
|
||||
*/
|
||||
|
||||
|
||||
#[\AllowDynamicProperties]
|
||||
class DataConnector_pdo_sqlite extends DataConnector_pdo
|
||||
{
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace IMSGlobal\LTI\ToolProvider\MediaType;
|
||||
* @version 3.0.0
|
||||
* @license GNU Lesser General Public License, version 3 (<http://www.gnu.org/licenses/lgpl.html>)
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class Message
|
||||
{
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ use IMSGlobal\LTI\Profile\ResourceHandler as ProfileResourceHandler;
|
||||
* @version 3.0.0
|
||||
* @license GNU Lesser General Public License, version 3 (<http://www.gnu.org/licenses/lgpl.html>)
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class ResourceHandler
|
||||
{
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ use IMSGlobal\LTI\ToolProvider\ToolProvider;
|
||||
* @version 3.0.0
|
||||
* @license GNU Lesser General Public License, version 3 (<http://www.gnu.org/licenses/lgpl.html>)
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class SecurityContract
|
||||
{
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ use IMSGlobal\LTI\ToolProvider\ToolProvider;
|
||||
* @version 3.0.0
|
||||
* @license GNU Lesser General Public License, version 3 (<http://www.gnu.org/licenses/lgpl.html>)
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class ToolProfile
|
||||
{
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ use IMSGlobal\LTI\ToolProvider\ToolProvider;
|
||||
* @version 3.0.0
|
||||
* @license GNU Lesser General Public License, version 3 (<http://www.gnu.org/licenses/lgpl.html>)
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class ToolProxy
|
||||
{
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ use IMSGlobal\LTI\OAuth;
|
||||
* @version 3.0.2
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class OAuthDataStore extends OAuth\OAuthDataStore
|
||||
{
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace IMSGlobal\LTI\ToolProvider;
|
||||
* @version 3.0.2
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class Outcome
|
||||
{
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ use IMSGlobal\LTI\OAuth;
|
||||
* @version 3.0.2
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class ResourceLink
|
||||
{
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace IMSGlobal\LTI\ToolProvider;
|
||||
* @version 3.0.0
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class ResourceLinkShare
|
||||
{
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ use IMSGlobal\LTI\ToolProvider\DataConnector\DataConnector;
|
||||
* @version 3.0.2
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class ResourceLinkShareKey
|
||||
{
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ use IMSGlobal\LTI\ToolProvider;
|
||||
* @version 3.0.0
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class Membership extends Service
|
||||
{
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ use IMSGlobal\LTI\HTTPMessage;
|
||||
* @version 3.0.0
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class Service
|
||||
{
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace IMSGlobal\LTI\ToolProvider\Service;
|
||||
* @version 3.0.0
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class ToolSettings extends Service
|
||||
{
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ use stdClass;
|
||||
* @version 3.0.2
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class ToolConsumer
|
||||
{
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ use IMSGlobal\LTI\OAuth;
|
||||
* @version 3.0.2
|
||||
* @license GNU Lesser General Public License, version 3 (<http://www.gnu.org/licenses/lgpl.html>)
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class ToolProvider
|
||||
{
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ use IMSGlobal\LTI\ToolProvider\MediaType;
|
||||
* @version 3.0.2
|
||||
* @license GNU Lesser General Public License, version 3 (<http://www.gnu.org/licenses/lgpl.html>)
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class ToolProxy
|
||||
{
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ use IMSGlobal\LTI\ToolProvider\DataConnector\DataConnector;
|
||||
* @version 3.0.2
|
||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class User
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user