From 962559c8eb54ef92e5eb160d4bc290ce1f8ad6c5 Mon Sep 17 00:00:00 2001 From: Mathias Kahl Date: Fri, 15 Dec 2023 09:03:37 +0100 Subject: [PATCH] v1.0.26 improved PHP 8.3 compatibility Starting from PHP 8.3 dynamic class property declares are deprecated. Added inspection and remove instances of this in our code. --- .../inspectionProfiles/Moodle_CodeSniffer.xml | 6 +++--- .idea/scopes/kialo.xml | 3 +++ development/README.md | 2 +- tests/classes/lti_flow_test.php | 18 ++++++++++++++++++ version.php | 4 ++-- 5 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 .idea/scopes/kialo.xml diff --git a/.idea/inspectionProfiles/Moodle_CodeSniffer.xml b/.idea/inspectionProfiles/Moodle_CodeSniffer.xml index 90041b8..3a85f6a 100644 --- a/.idea/inspectionProfiles/Moodle_CodeSniffer.xml +++ b/.idea/inspectionProfiles/Moodle_CodeSniffer.xml @@ -565,7 +565,6 @@ - @@ -831,7 +830,6 @@ - @@ -1348,7 +1346,9 @@ - + + diff --git a/.idea/scopes/kialo.xml b/.idea/scopes/kialo.xml new file mode 100644 index 0000000..46cef60 --- /dev/null +++ b/.idea/scopes/kialo.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/development/README.md b/development/README.md index 12665ae..5b02114 100644 --- a/development/README.md +++ b/development/README.md @@ -5,7 +5,7 @@ * Git * PHP composer (https://getcomposer.org/) * on macOS you can install via `brew install composer` -* PHP 7.4 or higher +* PHP 7.4 or PHP 8.2 * If you installed composer `brew`, this should already be installed * Docker (https://www.docker.com/) diff --git a/tests/classes/lti_flow_test.php b/tests/classes/lti_flow_test.php index e5c4056..e14abf3 100644 --- a/tests/classes/lti_flow_test.php +++ b/tests/classes/lti_flow_test.php @@ -97,6 +97,24 @@ class lti_flow_test extends \advanced_testcase { */ private $cmid; + /** + * Copy of $_SERVER superglobal before the test. + * @var array|null + */ + private $server; + + /** + * Copy of $_ENV superglobal before the test. + * @var array|null + */ + private $env; + + /** + * Copy of $_GET superglobal before the test. + * @var array|null + */ + private $get; + /** * In production the tool's (Kialo's) public key is downloaded from the platform (Moodle) during the LTI flow. * For this test we generate a new keypair and override the tool keychain in kialo_config, instead. * diff --git a/version.php b/version.php index c011e8d..c148176 100644 --- a/version.php +++ b/version.php @@ -28,8 +28,8 @@ $plugin->component = 'mod_kialo'; // See https://moodledev.io/docs/apis/commonfiles/version.php. -$plugin->version = 2023112901; // Must be incremented for each new release! -$plugin->release = '1.0.25'; // Semantic version. +$plugin->version = 2023121501; // Must be incremented for each new release! +$plugin->release = '1.0.26'; // Semantic version. // Officially we require PHP 7.4. The first Moodle version that requires this as a minimum is Moodle 4.1. // But technically this plugin also runs on older Moodle versions, as long as they run on PHP 7.4,