From 39f6f7324e3840ff27ef9568b883f0253b3b18f9 Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Mon, 6 Mar 2023 12:45:34 +0000 Subject: [PATCH] MDL-77541 customfield_select: final removal of deprecated 310 method. --- .../field/select/classes/field_controller.php | 21 +++---------------- customfield/upgrade.txt | 4 ++++ 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/customfield/field/select/classes/field_controller.php b/customfield/field/select/classes/field_controller.php index 6f198f745c4..c2dca2ee8e8 100644 --- a/customfield/field/select/classes/field_controller.php +++ b/customfield/field/select/classes/field_controller.php @@ -14,17 +14,9 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . -/** - * Class field - * - * @package customfield_select - * @copyright 2018 David Matamoros - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - namespace customfield_select; -defined('MOODLE_INTERNAL') || die; +use coding_exception; /** * Class field @@ -56,17 +48,10 @@ class field_controller extends \core_customfield\field_controller { } /** - * Returns the options available as an array. - * - * @param \core_customfield\field_controller $field - * @return array - * * @deprecated since Moodle 3.10 - MDL-68569 please use $field->get_options */ - public static function get_options_array(\core_customfield\field_controller $field) : array { - debugging('get_options_array() is deprecated, please use $field->get_options() instead', DEBUG_DEVELOPER); - - return $field->get_options(); + public static function get_options_array(): void { + throw new coding_exception('get_options_array() is deprecated, please use $field->get_options() instead'); } /** diff --git a/customfield/upgrade.txt b/customfield/upgrade.txt index d133fbf4bff..ae20f2d948f 100644 --- a/customfield/upgrade.txt +++ b/customfield/upgrade.txt @@ -1,6 +1,10 @@ This files describes API changes in /customfield/*, Information provided here is intended especially for developers. +=== 4.2 === +* The `\customfield_select\field_controller::get_options_array` method, deprecated since 3.10, has been removed, use + the field instance `get_options` method instead + === 3.11 === * Methods \core_customfield\handler::get_field_config_form() and \core_customfield\handler::setup_edit_page() are no longer used. Components that define custom fields areas do not need to implement them. Field edit form opens in