From 8c7158e2248593113c7447db94e078e104eb6532 Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Wed, 19 Apr 2023 14:47:33 +0100 Subject: [PATCH] MDL-71067 phpunit: final removal of deprecated 311 coverage properties. --- lib/phpunit/classes/coverage_info.php | 35 --------------------------- lib/upgrade.txt | 3 +++ 2 files changed, 3 insertions(+), 35 deletions(-) diff --git a/lib/phpunit/classes/coverage_info.php b/lib/phpunit/classes/coverage_info.php index 036a947229b..05efbd851ff 100644 --- a/lib/phpunit/classes/coverage_info.php +++ b/lib/phpunit/classes/coverage_info.php @@ -22,31 +22,8 @@ * @copyright 2018 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ - -defined('MOODLE_INTERNAL') || die(); - -/** - * Coverage information for PHPUnit. - * - * @copyright 2018 Andrew Nicols - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ class phpunit_coverage_info { - /** - * @var array The list of folders relative to the plugin root to whitelist in coverage generation. - * @deprecated since Moodle 3.11 MDL-70745 - please don't use this property any more. - * @todo MDL-71067 - remove in Moodle 4.3 - */ - protected $whitelistfolders = []; - - /** - * @var array The list of files relative to the plugin root to whitelist in coverage generation. - * @deprecated since Moodle 3.11 MDL-70745 - please don't use this property any more. - * @todo MDL-71067 - remove in Moodle 4.3 - */ - protected $whitelistfiles = []; - /** @var array The list of folders relative to the plugin root to include in coverage generation. */ protected $includelistfolders = []; @@ -83,18 +60,6 @@ class phpunit_coverage_info { if (!empty($plugindir)) { $plugindir .= "/"; - - // TODO: MDL-71067 - remove this whole block once these properties deprecation period ends. - if (!empty($this->whitelistfolders) || !empty($this->whitelistfiles)) { - // Warning if the deprecated (whitelist) properties are found. - echo "Warning: \$whitelistfolders and \$whitelistfiles in " . - "coverage.php files are deprecated since Moodle 3.11. " . - "Please, replace them with \$includelistfolders and " . - "\$includelistfiles in {$plugindir}tests/coverage.php\n"; - - $includelistfolders = array_merge($includelistfolders, $this->whitelistfolders); - $includelistfiles = array_merge($includelistfiles, $this->whitelistfiles); - } } foreach (array_unique($includelistfolders) as $folder) { diff --git a/lib/upgrade.txt b/lib/upgrade.txt index 7f6c47eec36..7fcd5bf2c96 100644 --- a/lib/upgrade.txt +++ b/lib/upgrade.txt @@ -7,6 +7,9 @@ information provided here is intended especially for developers. - admin_setting_requiredpasswordunmask * The badges_get_oauth2_service_options() method has been deprecated, because it's not required anymore. It should no longer be used. +* Support for the following phpunit coverage info properties, deprecated since 3.11, has been removed: + - `whitelistfolders` + - `whitelistfiles` === 4.2 ===