From 3714fe7e6ec611ed2a8756ca867233e8d4b97af0 Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Mon, 23 Jul 2018 15:54:13 +0800 Subject: [PATCH] MDL-57244 general: Remove old class renames. --- competency/tests/privacy_test.php | 2 +- lib/db/renamedclasses.php | 10 ----- mod/quiz/db/renamedclasses.php | 34 ----------------- mod/scorm/db/renamedclasses.php | 40 -------------------- mod/scorm/report/basic/db/renamedclasses.php | 40 -------------------- 5 files changed, 1 insertion(+), 125 deletions(-) delete mode 100644 mod/quiz/db/renamedclasses.php delete mode 100644 mod/scorm/db/renamedclasses.php delete mode 100644 mod/scorm/report/basic/db/renamedclasses.php diff --git a/competency/tests/privacy_test.php b/competency/tests/privacy_test.php index b07db9ad943..2ac2247f786 100644 --- a/competency/tests/privacy_test.php +++ b/competency/tests/privacy_test.php @@ -50,7 +50,7 @@ class core_competency_privacy_testcase extends provider_testcase { global $PAGE; $this->resetAfterTest(); - // We need this or exporters (core_competency\external\exporter) do not receive the right renderer. + // We need this or exporters (core\external\exporter) do not receive the right renderer. $PAGE->get_renderer('core'); } diff --git a/lib/db/renamedclasses.php b/lib/db/renamedclasses.php index 30d4b42fb36..9ccba774025 100644 --- a/lib/db/renamedclasses.php +++ b/lib/db/renamedclasses.php @@ -35,15 +35,5 @@ defined('MOODLE_INTERNAL') || die(); // Like other files in the db directory this file uses an array. // The old class name is the key, the new class name is the value. // The array must be called $renamedclasses. -// TODO MDL-57244 These renamed classes will be removed in 3.6 $renamedclasses = array( - 'core\progress\null' => 'core\progress\none', - 'core_search\area\base' => 'core_search\base', - 'core_search\area\base_mod' => 'core_search\base_mod', - 'core_search\area\base_activity' => 'core_search\base_activity', - 'core_competency\\external\\exporter' => 'core\\external\\exporter', - 'core_competency\\external\\persistent_exporter' => 'core\\external\\persistent_exporter', - 'core_competency\\external\\comment_area_exporter' => 'core_comment\\external\\comment_area_exporter', - 'core_competency\\external\\stored_file_exporter' => 'core_files\\external\\stored_file_exporter', - 'core_competency\\external\\user_summary_exporter' => 'core_user\\external\\user_summary_exporter' ); diff --git a/mod/quiz/db/renamedclasses.php b/mod/quiz/db/renamedclasses.php deleted file mode 100644 index 3cc07a1c1ff..00000000000 --- a/mod/quiz/db/renamedclasses.php +++ /dev/null @@ -1,34 +0,0 @@ -. - -/** - * Lists renamed classes so that the autoloader can make the old names still work. - * - * @package mod_quiz - * @copyright 2014 Tim Hunt - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - -defined('MOODLE_INTERNAL') || die(); - -// Array 'old_class_name' => 'new\class_name'. -$renamedclasses = array( - - // Changed in Moodle 2.8. - 'quiz_question_bank_view' => 'mod_quiz\question\bank\custom_view', - 'question_bank_add_to_quiz_action_column' => 'mod_quiz\question\bank\add_action_column', - 'question_bank_question_name_text_column' => 'mod_quiz\question\bank\question_name_text_column', -); diff --git a/mod/scorm/db/renamedclasses.php b/mod/scorm/db/renamedclasses.php deleted file mode 100644 index 9754028470d..00000000000 --- a/mod/scorm/db/renamedclasses.php +++ /dev/null @@ -1,40 +0,0 @@ -. - -/** - * This file contains mappings for classes that have been renamed so that they meet the requirements of the autoloader. - * - * Renaming isn't always the recommended approach, but can provide benefit in situations where we've already got a - * close structure, OR where lots of classes get included and not necessarily used, or checked for often. - * - * When renaming a class delete the original class and add an entry to the db/renamedclasses.php directory for that - * component. - * This way we don't need to keep around old classes, instead creating aliases only when required. - * One big advantage to this method is that we provide consistent debugging for renamed classes when they are used. - * - * @package mod_scorm - * @copyright 2014 onwards Ankit Agarwal - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - -defined('MOODLE_INTERNAL') || die(); - -// Like other files in the db directory this file uses an array. -// The old class name is the key, the new class name is the value. -// The array must be called $renamedclasses. -$renamedclasses = array( - 'scorm_default_report' => 'mod_scorm\report' -); diff --git a/mod/scorm/report/basic/db/renamedclasses.php b/mod/scorm/report/basic/db/renamedclasses.php deleted file mode 100644 index f5f7b6c60af..00000000000 --- a/mod/scorm/report/basic/db/renamedclasses.php +++ /dev/null @@ -1,40 +0,0 @@ -. - -/** - * This file contains mappings for classes that have been renamed so that they meet the requirements of the autoloader. - * - * Renaming isn't always the recommended approach, but can provide benefit in situations where we've already got a - * close structure, OR where lots of classes get included and not necessarily used, or checked for often. - * - * When renaming a class delete the original class and add an entry to the db/renamedclasses.php directory for that - * component. - * This way we don't need to keep around old classes, instead creating aliases only when required. - * One big advantage to this method is that we provide consistent debugging for renamed classes when they are used. - * - * @package scormreport_basic - * @copyright 2014 onwards Ankit Agarwal - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - -defined('MOODLE_INTERNAL') || die(); - -// Like other files in the db directory this file uses an array. -// The old class name is the key, the new class name is the value. -// The array must be called $renamedclasses. -$renamedclasses = array( - 'scorm_basic_report' => 'scormreport_basic\report' -);