From bf18273a0896578f5253a5681acbb5929aae4126 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Tue, 1 Jul 2025 22:00:33 +0800 Subject: [PATCH] MDL-85897 core: Move all deprecations to emit_deprecation --- .../local/areas/core_question/answerbase.php | 2 +- .../local/areas/core_question/base.php | 2 +- admin/tool/mfa/classes/output/renderer.php | 2 +- .../table/aiprovider_management_table.php | 4 +- availability/renderer.php | 2 +- backup/controller/base_controller.class.php | 4 +- .../local/systemreports/course_badges.php | 8 +- badges/renderer.php | 4 +- calendar/deprecatedlib.php | 12 +-- calendar/lib.php | 2 +- calendar/renderer.php | 2 +- .../bulk_activity_completion_renderer.php | 2 +- .../local/formatters/completion.php | 2 +- .../local/formatters/enrolment.php | 2 +- course/dnduploadlib.php | 2 +- course/format/classes/base.php | 6 +- course/format/classes/hook_listener.php | 2 +- .../output/local/content/cm/controlmenu.php | 2 +- .../local/content/cm/delegatedcontrolmenu.php | 2 +- .../local/content/section/availability.php | 2 +- .../local/content/section/controlmenu.php | 6 +- course/format/classes/stateactions.php | 4 +- .../content/section/controlmenu.php | 4 +- course/lib.php | 4 +- course/renderer.php | 2 +- enrol/guest/locallib.php | 2 +- enrol/self/lib.php | 4 +- enrol/self/locallib.php | 2 +- grade/lib.php | 12 +-- grade/renderer.php | 4 +- grade/report/grader/lib.php | 2 +- .../tests/behat/behat_gradereport_grader.php | 2 +- grade/report/lib.php | 2 +- grade/tests/behat/behat_grade.php | 4 +- lib/ajax/ajaxlib.php | 2 +- lib/classes/aws/admin_settings_aws_region.php | 2 +- lib/classes/aws/aws_helper.php | 6 +- lib/classes/aws/client_factory.php | 2 +- lib/classes/encryption.php | 2 +- lib/classes/hub/site_registration_form.php | 2 +- lib/classes/moodlenet/activity_sender.php | 2 +- lib/classes/output/action_menu.php | 6 +- lib/classes/output/core_renderer.php | 12 +-- lib/classes/output/renderer_base.php | 2 +- lib/classes/report_helper.php | 2 +- lib/classes/session/manager.php | 8 +- lib/classes/task/manager.php | 2 +- lib/classes/task/task_base.php | 4 +- lib/classes/text.php | 2 +- lib/deprecatedlib.php | 82 +++++++++---------- lib/dml/moodle_database.php | 4 +- lib/dml/moodle_read_slave_trait.php | 10 +-- lib/enrollib.php | 2 +- lib/listlib.php | 50 +++++------ lib/navigationlib.php | 2 +- mnet/peer.php | 2 +- mod/assign/classes/output/renderer.php | 2 +- mod/assign/feedbackplugin.php | 2 +- mod/assign/gradingbatchoperationsform.php | 2 +- mod/assign/gradingtable.php | 4 +- mod/assign/locallib.php | 2 +- mod/assign/renderable.php | 4 +- mod/book/deprecatedlib.php | 2 +- mod/data/deprecatedlib.php | 22 ++--- mod/data/renderer.php | 4 +- mod/feedback/classes/output/renderer.php | 2 +- mod/feedback/deprecatedlib.php | 2 +- mod/folder/renderer.php | 2 +- mod/imscp/deprecatedlib.php | 2 +- mod/lti/deprecatedlib.php | 2 +- mod/quiz/classes/external.php | 2 +- .../classes/question/bank/qbank_helper.php | 2 +- mod/quiz/deprecatedlib.php | 4 +- mod/wiki/renderer.php | 2 +- question/bank/bulkmove/classes/helper.php | 2 +- .../bank/bulkmove/classes/output/renderer.php | 2 +- question/bank/history/classes/helper.php | 2 +- .../history/classes/question_history_view.php | 2 +- .../classes/category_condition.php | 12 +-- .../bank/managecategories/classes/helper.php | 6 +- .../classes/question_category_list.php | 8 +- .../classes/question_category_list_item.php | 4 +- .../classes/question_category_object.php | 32 ++++---- question/bank/statistics/classes/helper.php | 6 +- question/classes/local/bank/view.php | 16 ++-- question/renderer.php | 6 +- question/type/questiontypebase.php | 2 +- report/eventlist/classes/list_generator.php | 4 +- reportbuilder/classes/local/entities/base.php | 2 +- .../classes/local/helpers/audience.php | 2 +- .../classes/local/helpers/report.php | 2 +- .../classes/local/helpers/schedule.php | 2 +- .../local/helpers/user_filter_manager.php | 2 +- reportbuilder/classes/output/renderer.php | 2 +- repository/lib.php | 2 +- repository/onedrive/lib.php | 4 +- ...ehat_theme_classic_behat_core_question.php | 2 +- user/classes/table/participants_search.php | 2 +- 98 files changed, 259 insertions(+), 259 deletions(-) diff --git a/admin/tool/brickfield/classes/local/areas/core_question/answerbase.php b/admin/tool/brickfield/classes/local/areas/core_question/answerbase.php index fa824dc7923..382b10e2a7c 100644 --- a/admin/tool/brickfield/classes/local/areas/core_question/answerbase.php +++ b/admin/tool/brickfield/classes/local/areas/core_question/answerbase.php @@ -87,7 +87,7 @@ abstract class answerbase extends base { */ #[\core\attribute\deprecated(null, since: '5.0', reason: 'This method should not be used', mdl: 'MDL-71378')] public function find_system_areas(): ?\moodle_recordset { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); global $DB; $params = [ 'syscontext' => CONTEXT_SYSTEM, diff --git a/admin/tool/brickfield/classes/local/areas/core_question/base.php b/admin/tool/brickfield/classes/local/areas/core_question/base.php index be04ff035b6..191f0e57eb5 100644 --- a/admin/tool/brickfield/classes/local/areas/core_question/base.php +++ b/admin/tool/brickfield/classes/local/areas/core_question/base.php @@ -111,7 +111,7 @@ abstract class base extends area_base { */ #[\core\attribute\deprecated(null, since: '5.0', reason: 'This method should not be used', mdl: 'MDL-71378')] public function find_system_areas(): ?\moodle_recordset { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); global $DB; $params = [ 'syscontext' => CONTEXT_SYSTEM, diff --git a/admin/tool/mfa/classes/output/renderer.php b/admin/tool/mfa/classes/output/renderer.php index 21bbba0188a..2ea5b639498 100644 --- a/admin/tool/mfa/classes/output/renderer.php +++ b/admin/tool/mfa/classes/output/renderer.php @@ -147,7 +147,7 @@ class renderer extends \plugin_renderer_base { */ #[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.4', mdl: 'MDL-79920', final: true)] public function setup_factor(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/ai/classes/table/aiprovider_management_table.php b/ai/classes/table/aiprovider_management_table.php index 7025304c2be..cbd1cdaedbf 100644 --- a/ai/classes/table/aiprovider_management_table.php +++ b/ai/classes/table/aiprovider_management_table.php @@ -64,7 +64,7 @@ class aiprovider_management_table extends flexible_table implements dynamic_tabl */ #[\core\attribute\deprecated(replacement: null, since: '5.0', mdl: 'MDL-82977')] protected function get_plugintype(): string { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return 'aiprovider'; } @@ -125,7 +125,7 @@ class aiprovider_management_table extends flexible_table implements dynamic_tabl */ #[\core\attribute\deprecated(replacement: null, since: '5.0', mdl: 'MDL-82977')] protected function get_action_url(array $params = []): moodle_url { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return new moodle_url('/admin/ai.php', $params); } diff --git a/availability/renderer.php b/availability/renderer.php index 428fadc5274..3c88be9ff2f 100644 --- a/availability/renderer.php +++ b/availability/renderer.php @@ -31,6 +31,6 @@ class core_availability_renderer extends plugin_renderer_base { */ #[\core\attribute\deprecated(availability_info::class, since: '4.0', mdl: 'MDL-71691', final: true)] public function render_core_availability_multiple_messages(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } } diff --git a/backup/controller/base_controller.class.php b/backup/controller/base_controller.class.php index f6dd3cef711..66ce9403e58 100644 --- a/backup/controller/base_controller.class.php +++ b/backup/controller/base_controller.class.php @@ -111,7 +111,7 @@ abstract class base_controller extends backup implements loggable { */ #[\core\attribute\deprecated(since: '4.1', mdl: 'MDL-74548', final: true)] public function set_copy(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -119,6 +119,6 @@ abstract class base_controller extends backup implements loggable { */ #[\core\attribute\deprecated('restore_controller::get_copy()', since: '4.1', mdl: 'MDL-74548', final: true)] public function get_copy() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } } diff --git a/badges/classes/reportbuilder/local/systemreports/course_badges.php b/badges/classes/reportbuilder/local/systemreports/course_badges.php index 0f42cd53ecd..e64c4dc3d4d 100644 --- a/badges/classes/reportbuilder/local/systemreports/course_badges.php +++ b/badges/classes/reportbuilder/local/systemreports/course_badges.php @@ -51,7 +51,7 @@ class course_badges extends system_report { */ #[\core\attribute\deprecated('course_badges::initialise', since: '4.5', mdl: 'MDL-82503')] protected function initialise(): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $USER; // Our main entity, it contains all of the column definitions that we need. $badgeentity = new badge(); @@ -103,7 +103,7 @@ class course_badges extends system_report { */ #[\core\attribute\deprecated('course_badges::can_view', since: '4.5', mdl: 'MDL-82503')] protected function can_view(): bool { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return has_capability('moodle/badges:viewbadges', $this->get_context()); } @@ -118,7 +118,7 @@ class course_badges extends system_report { */ #[\core\attribute\deprecated('course_badges::add_columns', since: '4.5', mdl: 'MDL-82503')] protected function add_columns(): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $badgeissuedalias = $this->get_entity('badge_issued')->get_table_alias('badge_issued'); $this->add_columns_from_entities([ @@ -156,7 +156,7 @@ class course_badges extends system_report { */ #[\core\attribute\deprecated('course_badges::add_filters', since: '4.5', mdl: 'MDL-82503')] protected function add_filters(): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $this->add_filters_from_entities([ 'badge:name', 'badge_issued:issued', diff --git a/badges/renderer.php b/badges/renderer.php index 165f9f526c8..43979dcff1e 100644 --- a/badges/renderer.php +++ b/badges/renderer.php @@ -271,7 +271,7 @@ class core_badges_renderer extends plugin_renderer_base { */ #[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.3', mdl: 'MDL-77061', final: true)] public function print_badge_table_actions() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -443,7 +443,7 @@ class core_badges_renderer extends plugin_renderer_base { */ #[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.3', mdl: 'MDL-77061', final: true)] protected function render_badge_management() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/calendar/deprecatedlib.php b/calendar/deprecatedlib.php index 7c3def9b6a7..76d52a112d8 100644 --- a/calendar/deprecatedlib.php +++ b/calendar/deprecatedlib.php @@ -47,7 +47,7 @@ use core_calendar\output\humantimeperiod; function calendar_day_representation($tstamp, $now = false, $usecommonwords = true) { static $shortformat; - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); if (empty($shortformat)) { $shortformat = get_string('strftimedayshort'); @@ -96,7 +96,7 @@ function calendar_day_representation($tstamp, $now = false, $usecommonwords = tr mdl: 'MDL-83873', )] function calendar_time_representation($time) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); global $OUTPUT; @@ -127,7 +127,7 @@ function calendar_time_representation($time) { mdl: 'MDL-83873', )] function calendar_format_event_time($event, $now, $linkparams = null, $usecommonwords = true, $showtime = 0) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); global $OUTPUT; @@ -151,7 +151,7 @@ function calendar_format_event_time($event, $now, $linkparams = null, $usecommon final: true, )] function calendar_add_event_metadata() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -169,7 +169,7 @@ function calendar_add_event_metadata() { mdl: 'MDL-84617', )] function calendar_get_courselink($course) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); if (!$course) { return ''; @@ -207,7 +207,7 @@ function calendar_get_courselink($course) { mdl: 'MDL-84617', )] function calendar_events_by_day($events, $month, $year, &$eventsbyday, &$durationbyday, &$typesbyday, &$courses) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); $calendartype = \core_calendar\type_factory::get_calendar_instance(); diff --git a/calendar/lib.php b/calendar/lib.php index c00c505d555..40571c7f12a 100644 --- a/calendar/lib.php +++ b/calendar/lib.php @@ -1184,7 +1184,7 @@ class calendar_information { */ #[\core\attribute\deprecated('prepare_for_view', since: '3.4', mdl: 'MDL-59890', final: true)] public function prepare_for_view() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/calendar/renderer.php b/calendar/renderer.php index 4e03aed21f3..dfc4c2bce45 100644 --- a/calendar/renderer.php +++ b/calendar/renderer.php @@ -86,7 +86,7 @@ class core_calendar_renderer extends plugin_renderer_base { final: true, )] public function event() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** diff --git a/course/classes/output/bulk_activity_completion_renderer.php b/course/classes/output/bulk_activity_completion_renderer.php index a5bb193d870..f96ad007ad3 100644 --- a/course/classes/output/bulk_activity_completion_renderer.php +++ b/course/classes/output/bulk_activity_completion_renderer.php @@ -118,7 +118,7 @@ class core_course_bulk_activity_completion_renderer extends plugin_renderer_base */ #[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-78528', final: true)] public function edit_default_completion() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/course/classes/reportbuilder/local/formatters/completion.php b/course/classes/reportbuilder/local/formatters/completion.php index 786b04d05f2..f204df3d615 100644 --- a/course/classes/reportbuilder/local/formatters/completion.php +++ b/course/classes/reportbuilder/local/formatters/completion.php @@ -71,7 +71,7 @@ class completion { */ #[\core\attribute\deprecated(null, mdl: 'MDL-82467', since: '4.5')] public static function get_days(?int $value, stdClass $row): ?int { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); // Do not show anything if there is no userid. if (!$row->userid) { diff --git a/course/classes/reportbuilder/local/formatters/enrolment.php b/course/classes/reportbuilder/local/formatters/enrolment.php index 9b1b3914835..126aa479579 100644 --- a/course/classes/reportbuilder/local/formatters/enrolment.php +++ b/course/classes/reportbuilder/local/formatters/enrolment.php @@ -35,7 +35,7 @@ class enrolment { */ #[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.3', mdl: 'MDL-76900', final: true)] public static function enrolment_name(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/course/dnduploadlib.php b/course/dnduploadlib.php index 76b54d2b9e0..e2383d3d53b 100644 --- a/course/dnduploadlib.php +++ b/course/dnduploadlib.php @@ -47,7 +47,7 @@ require_once($CFG->dirroot.'/course/lib.php'); function dndupload_add_to_course($course, $modnames) { global $CFG, $PAGE; - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); $showstatus = optional_param('notifyeditingon', false, PARAM_BOOL); diff --git a/course/format/classes/base.php b/course/format/classes/base.php index c5f04b9afb8..bd1e343dea7 100644 --- a/course/format/classes/base.php +++ b/course/format/classes/base.php @@ -664,7 +664,7 @@ abstract class base { final: true, )] public function set_section_number(int $singlesection): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -712,7 +712,7 @@ abstract class base { final: true, )] public function get_section_number(): int { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); return 0; } @@ -1009,7 +1009,7 @@ abstract class base { if (!isset($nonajaxactions[$action])) { throw new coding_exception('Unknown activity action: ' . $action); } - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $nonajaxaction = $nonajaxactions[$action]; return $this->get_update_url( action: $nonajaxaction, diff --git a/course/format/classes/hook_listener.php b/course/format/classes/hook_listener.php index 29bd46be781..d333e27dfb1 100644 --- a/course/format/classes/hook_listener.php +++ b/course/format/classes/hook_listener.php @@ -66,7 +66,7 @@ class hook_listener { public static function before_course_viewed(before_course_viewed $hook): void { global $CFG; if (file_exists($CFG->dirroot . '/course/externservercourse.php')) { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); include($CFG->dirroot . '/course/externservercourse.php'); if (function_exists('extern_server_course')) { if ($externurl = extern_server_course($hook->course)) { diff --git a/course/format/classes/output/local/content/cm/controlmenu.php b/course/format/classes/output/local/content/cm/controlmenu.php index 9b835c72034..7dcdd246709 100644 --- a/course/format/classes/output/local/content/cm/controlmenu.php +++ b/course/format/classes/output/local/content/cm/controlmenu.php @@ -481,7 +481,7 @@ class controlmenu extends basecontrolmenu { mdl: 'MDL-83527', )] protected function cm_control_items() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); $format = $this->format; $mod = $this->mod; $sectionreturn = $format->get_sectionnum(); diff --git a/course/format/classes/output/local/content/cm/delegatedcontrolmenu.php b/course/format/classes/output/local/content/cm/delegatedcontrolmenu.php index d3044541b1f..ab11f47d13f 100644 --- a/course/format/classes/output/local/content/cm/delegatedcontrolmenu.php +++ b/course/format/classes/output/local/content/cm/delegatedcontrolmenu.php @@ -317,7 +317,7 @@ class delegatedcontrolmenu extends basecontrolmenu { )] protected function delegated_control_items_legacy(): array { global $USER; - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); $format = $this->format; $section = $this->section; diff --git a/course/format/classes/output/local/content/section/availability.php b/course/format/classes/output/local/content/section/availability.php index 64709844133..a9b4839aeb2 100644 --- a/course/format/classes/output/local/content/section/availability.php +++ b/course/format/classes/output/local/content/section/availability.php @@ -255,6 +255,6 @@ class availability implements named_templatable, renderable { */ #[\core\attribute\deprecated('get_availability_data()', since: '4.3', mdl: 'MDL-78489', final: true)] protected function availability_info() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } } diff --git a/course/format/classes/output/local/content/section/controlmenu.php b/course/format/classes/output/local/content/section/controlmenu.php index e6cc6040a32..9c6f44581a4 100644 --- a/course/format/classes/output/local/content/section/controlmenu.php +++ b/course/format/classes/output/local/content/section/controlmenu.php @@ -298,7 +298,7 @@ class controlmenu extends basecontrolmenu { mdl: 'MDL-83562', )] protected function get_section_moveup_item(): ?link { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); if ( $this->section->sectionnum <= 1 || $this->format->get_sectionid() @@ -347,7 +347,7 @@ class controlmenu extends basecontrolmenu { mdl: 'MDL-83562', )] protected function get_section_movedown_item(): ?link { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); $numsections = $this->format->get_last_section_number(); if ( @@ -458,7 +458,7 @@ class controlmenu extends basecontrolmenu { )] protected function section_control_items_legacy(): array { global $USER, $PAGE; - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); $format = $this->format; $section = $this->section; diff --git a/course/format/classes/stateactions.php b/course/format/classes/stateactions.php index 89e402f2933..da9c1a2eac0 100644 --- a/course/format/classes/stateactions.php +++ b/course/format/classes/stateactions.php @@ -157,7 +157,7 @@ class stateactions { ?int $targetsectionid = null, ?int $targetcmid = null ): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -1167,7 +1167,7 @@ class stateactions { global $CFG; require_once($CFG->dirroot . '/course/modlib.php'); - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); $coursecontext = context_course::instance($course->id); require_capability('moodle/course:update', $coursecontext); diff --git a/course/format/topics/classes/output/courseformat/content/section/controlmenu.php b/course/format/topics/classes/output/courseformat/content/section/controlmenu.php index b3918bbf3c9..d217a5e3151 100644 --- a/course/format/topics/classes/output/courseformat/content/section/controlmenu.php +++ b/course/format/topics/classes/output/courseformat/content/section/controlmenu.php @@ -78,7 +78,7 @@ class controlmenu extends controlmenu_base { reason: 'Not used anymore, use $this->format->get_update_url instead', )] protected function get_course_url(): url { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); $format = $this->format; $section = $this->section; $course = $format->get_course(); @@ -166,7 +166,7 @@ class controlmenu extends controlmenu_base { reason: 'Wrong return type', )] protected function get_highlight_control(): array { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); $format = $this->format; $section = $this->section; $course = $format->get_course(); diff --git a/course/lib.php b/course/lib.php index a104480fa03..709a24951b3 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1375,7 +1375,7 @@ function moveto_module($mod, $section, $beforemod=NULL) { function course_get_cm_edit_actions(cm_info $mod, $indent = -1, $sr = null) { global $COURSE, $SITE, $CFG; - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); static $str; @@ -1767,7 +1767,7 @@ function course_format_uses_sections($format) { */ #[\core\attribute\deprecated(since: '5.0', mdl: 'MDL-82351')] function course_format_ajax_support($format) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); $course = new stdClass(); $course->format = $format; return course_get_format($course)->supports_ajax(); diff --git a/course/renderer.php b/course/renderer.php index 825ef688634..346edaa84be 100644 --- a/course/renderer.php +++ b/course/renderer.php @@ -1416,7 +1416,7 @@ class core_course_renderer extends plugin_renderer_base { */ #[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-78744', final: true)] public function render_activity_information() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/enrol/guest/locallib.php b/enrol/guest/locallib.php index 65f5a247cd7..467cdb1ed2c 100644 --- a/enrol/guest/locallib.php +++ b/enrol/guest/locallib.php @@ -45,7 +45,7 @@ class enrol_guest_enrol_form extends moodleform { */ public function __construct($action=null, $customdata=null, $method='post', $target='', $attributes=null, $editable=true, $ajaxformdata=null) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); parent::__construct($action, $customdata, $method, $target, $attributes, $editable, $ajaxformdata); } diff --git a/enrol/self/lib.php b/enrol/self/lib.php index 7e993d2428a..d8d7c10cb44 100644 --- a/enrol/self/lib.php +++ b/enrol/self/lib.php @@ -437,7 +437,7 @@ class enrol_self_plugin extends enrol_plugin { */ #[\core\attribute\deprecated('enrol_plugin::send_course_welcome_message_to_user', since: '4.4', mdl: 'MDL-4188')] protected function email_welcome_message($instance, $user) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); $this->send_course_welcome_message_to_user( instance: $instance, userid: $user->id, @@ -1203,7 +1203,7 @@ class enrol_self_plugin extends enrol_plugin { */ #[\core\attribute\deprecated('enrol_plugin::get_welcome_message_contact', since: '4.4', mdl: 'MDL-4188', final: true)] public function get_welcome_email_contact() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/enrol/self/locallib.php b/enrol/self/locallib.php index b0684160b10..9ff497fdc05 100644 --- a/enrol/self/locallib.php +++ b/enrol/self/locallib.php @@ -76,7 +76,7 @@ class enrol_self_enrol_form extends moodleform { */ public function __construct($action=null, $customdata=null, $method='post', $target='', $attributes=null, $editable=true, $ajaxformdata=null) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); parent::__construct($action, $customdata, $method, $target, $attributes, $editable, $ajaxformdata); } diff --git a/grade/lib.php b/grade/lib.php index 22b276bf0f0..0f06321583a 100644 --- a/grade/lib.php +++ b/grade/lib.php @@ -417,7 +417,7 @@ class graded_users_iterator { */ #[\core\attribute\deprecated('grade_get_graded_users_select()', since: '5.0', mdl: 'MDL-84673')] function print_graded_users_selector($course, $actionpage, $userid=0, $groupid=0, $includeall=true, $return=false) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); global $OUTPUT; return $OUTPUT->render(grade_get_graded_users_select(substr($actionpage, 0, strpos($actionpage, '/')), $course, $userid, $groupid, $includeall)); } @@ -1466,7 +1466,7 @@ class grade_structure { */ #[\core\attribute\deprecated('grade_helper::get_element_icon', since: '4.4', mdl: 'MDL-77326', final: true)] public function get_element_icon(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -1474,7 +1474,7 @@ class grade_structure { */ #[\core\attribute\deprecated('grade_helper::get_element_type_string', since: '4.4', mdl: 'MDL-77326', final: true)] public function get_element_type_string(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -1482,7 +1482,7 @@ class grade_structure { */ #[\core\attribute\deprecated('grade_helper::get_element_header', since: '4.4', mdl: 'MDL-77326', final: true)] public function get_element_header(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -1490,7 +1490,7 @@ class grade_structure { */ #[\core\attribute\deprecated('grade_helper::get_activity_link', since: '4.4', mdl: 'MDL-77326', final: true)] private function get_activity_link(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -3416,7 +3416,7 @@ abstract class grade_helper { */ #[\core\attribute\deprecated('get_string', since: '4.3', mdl: 'MDL-78561', final: true)] public static function get_lang_string(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/grade/renderer.php b/grade/renderer.php index a8073dbc965..49dd5ea7136 100644 --- a/grade/renderer.php +++ b/grade/renderer.php @@ -59,7 +59,7 @@ class core_grades_renderer extends plugin_renderer_base { public function group_selector(object $course, ?string $groupactionbaseurl = null): ?string { global $USER; - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); if ($groupactionbaseurl !== null) { debugging( @@ -140,7 +140,7 @@ class core_grades_renderer extends plugin_renderer_base { ): stdClass { global $SESSION, $COURSE; - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); // User search. $searchvalue = optional_param('gpr_search', null, PARAM_NOTAGS); $userid = optional_param('grp_userid', null, PARAM_INT); diff --git a/grade/report/grader/lib.php b/grade/report/grader/lib.php index 8814bbf1779..767e631a237 100644 --- a/grade/report/grader/lib.php +++ b/grade/report/grader/lib.php @@ -1487,7 +1487,7 @@ class grade_report_grader extends grade_report { */ #[\core\attribute\deprecated('grade_report::calculate_average()', since: '4.4', final: true)] public function get_right_avg_row() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/grade/report/grader/tests/behat/behat_gradereport_grader.php b/grade/report/grader/tests/behat/behat_gradereport_grader.php index 426f926dc51..6b1902692da 100644 --- a/grade/report/grader/tests/behat/behat_gradereport_grader.php +++ b/grade/report/grader/tests/behat/behat_gradereport_grader.php @@ -50,7 +50,7 @@ class behat_gradereport_grader extends behat_base { */ #[\core\attribute\deprecated('behat_grades::get_grade_item_id', since: '4.2', mdl: 'MDL-77033', final: true)] protected function get_grade_item_id() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/grade/report/lib.php b/grade/report/lib.php index c79f1542ba9..91b1765cb2d 100644 --- a/grade/report/lib.php +++ b/grade/report/lib.php @@ -337,7 +337,7 @@ abstract class grade_report { */ #[\core\attribute\deprecated('get_string', since: '4.2', mdl: 'MDL-77033', final: true)] public function get_lang_string(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/grade/tests/behat/behat_grade.php b/grade/tests/behat/behat_grade.php index beb83ee4059..573a8039495 100644 --- a/grade/tests/behat/behat_grade.php +++ b/grade/tests/behat/behat_grade.php @@ -244,7 +244,7 @@ class behat_grade extends behat_base { */ #[\core\attribute\deprecated('behat_forms::i_set_the_field_to', since: '4.0', final: true)] protected function select_in_gradebook_tabs() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -307,6 +307,6 @@ class behat_grade extends behat_base { */ #[\core\attribute\deprecated('behat_forms::i_set_the_field_to', since: '4.1', final: true)] protected function select_in_gradebook_navigation_selector() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } } diff --git a/lib/ajax/ajaxlib.php b/lib/ajax/ajaxlib.php index 9be88035629..633f89b80b8 100644 --- a/lib/ajax/ajaxlib.php +++ b/lib/ajax/ajaxlib.php @@ -28,7 +28,7 @@ */ #[\core\attribute\deprecated('\'core_user/repository\' module', since: '4.3', mdl: 'MDL-76974', final: true)] function user_preference_allow_ajax_update() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** diff --git a/lib/classes/aws/admin_settings_aws_region.php b/lib/classes/aws/admin_settings_aws_region.php index 388a597352c..1cee3f9b29e 100644 --- a/lib/classes/aws/admin_settings_aws_region.php +++ b/lib/classes/aws/admin_settings_aws_region.php @@ -45,7 +45,7 @@ class admin_settings_aws_region extends \admin_setting_configtext { mdl: 'MDL-80962', )] public function output_html($data, $query='') { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $CFG, $OUTPUT; $default = $this->get_defaultsetting(); diff --git a/lib/classes/aws/aws_helper.php b/lib/classes/aws/aws_helper.php index ce77bb6c5f8..e6a7853836a 100644 --- a/lib/classes/aws/aws_helper.php +++ b/lib/classes/aws/aws_helper.php @@ -42,7 +42,7 @@ class aws_helper { mdl: 'MDL-80962', )] public static function get_proxy_string(): string { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); global $CFG; $proxy = ''; if (empty($CFG->proxytype)) { @@ -79,7 +79,7 @@ class aws_helper { mdl: 'MDL-80962', )] public static function configure_client_proxy(AwsClient $client): AwsClient { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); $client->getHandlerList()->appendBuild(self::add_proxy_when_required(), 'proxy_bypass'); return $client; } @@ -96,7 +96,7 @@ class aws_helper { mdl: 'MDL-80962', )] protected static function add_proxy_when_required(): callable { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return function (callable $fn) { return function (CommandInterface $command, ?RequestInterface $request = null) use ($fn) { if (isset($request)) { diff --git a/lib/classes/aws/client_factory.php b/lib/classes/aws/client_factory.php index 206ad4654fc..a4fdf671155 100644 --- a/lib/classes/aws/client_factory.php +++ b/lib/classes/aws/client_factory.php @@ -41,7 +41,7 @@ class client_factory { mdl: 'MDL-80962', )] public static function get_client(string $class, array $opts): AwsClient { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); // Modify the opts to add HTTP timeouts. if (empty($opts['http'])) { $opts['http'] = ['connect_timeout' => HOURSECS]; diff --git a/lib/classes/encryption.php b/lib/classes/encryption.php index 0b6b479e12d..cf696db25df 100644 --- a/lib/classes/encryption.php +++ b/lib/classes/encryption.php @@ -33,7 +33,7 @@ class encryption { */ #[\core\attribute\deprecated(null, reason: 'Sodium is always present', since: '4.3', mdl: 'MDL-71421', final: true)] public static function is_sodium_installed() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/lib/classes/hub/site_registration_form.php b/lib/classes/hub/site_registration_form.php index 12b1d0cce34..c6d5ab5cb2a 100644 --- a/lib/classes/hub/site_registration_form.php +++ b/lib/classes/hub/site_registration_form.php @@ -206,7 +206,7 @@ class site_registration_form extends \moodleform { final: true, )] protected function add_select_with_email() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/lib/classes/moodlenet/activity_sender.php b/lib/classes/moodlenet/activity_sender.php index 21ec9df54b7..1498513bc94 100644 --- a/lib/classes/moodlenet/activity_sender.php +++ b/lib/classes/moodlenet/activity_sender.php @@ -62,7 +62,7 @@ class activity_sender extends resource_sender { */ #[\core\attribute\deprecated('share_resource()', since: '4.3', mdl: 'MDL-75318', final: true)] public function share_activity() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/lib/classes/output/action_menu.php b/lib/classes/output/action_menu.php index fbebb8337b8..d1868b1b169 100644 --- a/lib/classes/output/action_menu.php +++ b/lib/classes/output/action_menu.php @@ -390,7 +390,7 @@ class action_menu implements renderable, templatable { */ #[\core\attribute\deprecated('action_menu::set_menu_left', since: '4.0', mdl: 'MDL-72466', final: true)] public function set_alignment(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -427,7 +427,7 @@ class action_menu implements renderable, templatable { */ #[\core\attribute\deprecated('action_menu::set_boundary', since: '4.3', mdl: 'MDL-77375', final: true)] public function set_constraint(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -451,7 +451,7 @@ class action_menu implements renderable, templatable { */ #[\core\attribute\deprecated('Use a list of action_icons instead', since: '3.2', mdl: 'MDL-55904', final: true)] public function do_not_enhance() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/lib/classes/output/core_renderer.php b/lib/classes/output/core_renderer.php index 6a68ee4ece7..d3a81dfec41 100644 --- a/lib/classes/output/core_renderer.php +++ b/lib/classes/output/core_renderer.php @@ -466,7 +466,7 @@ class core_renderer extends renderer_base { */ #[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-78744', final: true)] public function activity_information() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -1386,7 +1386,7 @@ class core_renderer extends renderer_base { mdl: 'MDL-83164', )] protected function render_action_menu_link(\action_menu_link $action) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return $this->render_action_menu__link($action); } @@ -1399,7 +1399,7 @@ class core_renderer extends renderer_base { mdl: 'MDL-83164', )] protected function render_action_menu_filler(\action_menu_filler $action) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return $this->render_action_menu__filler($action); } @@ -1412,7 +1412,7 @@ class core_renderer extends renderer_base { mdl: 'MDL-83164', )] protected function render_action_menu_primary(\action_menu_link $action) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return $this->render_action_menu__link_primary($action); } @@ -1425,7 +1425,7 @@ class core_renderer extends renderer_base { mdl: 'MDL-83164', )] protected function render_action_menu_secondary(\action_menu_link $action) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return $this->render_action_menu__link_secondary($action); } @@ -2896,7 +2896,7 @@ EOD; */ #[\core\attribute\deprecated('core_renderer::visually_hidden_text()', since: '5.0', mdl: 'MDL-81825')] public function sr_text(string $contents): string { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return $this->visually_hidden_text($contents); } diff --git a/lib/classes/output/renderer_base.php b/lib/classes/output/renderer_base.php index dc276135aaa..308a3253fe8 100644 --- a/lib/classes/output/renderer_base.php +++ b/lib/classes/output/renderer_base.php @@ -429,7 +429,7 @@ class renderer_base { */ #[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.0', final: true)] public function should_display_main_logo() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/lib/classes/report_helper.php b/lib/classes/report_helper.php index 84b08e6538d..a42d88708df 100644 --- a/lib/classes/report_helper.php +++ b/lib/classes/report_helper.php @@ -96,7 +96,7 @@ class report_helper { */ #[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.0', final: true)] public static function save_selected_report() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/lib/classes/session/manager.php b/lib/classes/session/manager.php index 308b7040e0d..dc803f2b487 100644 --- a/lib/classes/session/manager.php +++ b/lib/classes/session/manager.php @@ -896,7 +896,7 @@ class manager { since: '4.5', )] public static function kill_all_sessions(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); self::destroy_all(); } @@ -913,7 +913,7 @@ class manager { since: '4.5', )] public static function kill_session($sid): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); self::destroy($sid); } @@ -930,7 +930,7 @@ class manager { since: '4.5', )] public static function kill_sessions_for_auth_plugin(string $pluginname): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); self::destroy_by_auth_plugin($pluginname); } @@ -947,7 +947,7 @@ class manager { since: '4.5', )] public static function kill_user_sessions($userid, $keepsid = null) { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); self::destroy_user_sessions($userid, $keepsid); } diff --git a/lib/classes/task/manager.php b/lib/classes/task/manager.php index 005463e77bd..26967fdf53b 100644 --- a/lib/classes/task/manager.php +++ b/lib/classes/task/manager.php @@ -693,7 +693,7 @@ class manager { */ #[\core\attribute\deprecated('\core\task\manager::get_next_adhoc_task()', since: '4.1', mdl: 'MDL-67648', final: true)] public static function ensure_adhoc_task_qos(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/lib/classes/task/task_base.php b/lib/classes/task/task_base.php index 68f161910cb..556c6eda1a5 100644 --- a/lib/classes/task/task_base.php +++ b/lib/classes/task/task_base.php @@ -126,7 +126,7 @@ abstract class task_base { final: true, )] public function set_blocking() { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); } /** @@ -140,7 +140,7 @@ abstract class task_base { final: true, )] public function is_blocking() { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); } /** diff --git a/lib/classes/text.php b/lib/classes/text.php index aa2e820b6b7..73fcbd91d6c 100644 --- a/lib/classes/text.php +++ b/lib/classes/text.php @@ -85,7 +85,7 @@ class core_text { final: true, )] public static function reset_caches(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index 9ced39fa000..37d29317b13 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -47,7 +47,7 @@ defined('MOODLE_INTERNAL') || die(); */ #[\core\attribute\deprecated('core_component::get_core_subsystems', since: '4.5', mdl: 'MDL-82287')] function get_core_subsystems($fullpaths = false) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); global $CFG; $subsystems = core_component::get_core_subsystems(); @@ -79,7 +79,7 @@ function get_core_subsystems($fullpaths = false) { */ #[\core\attribute\deprecated('core_component::get_plugin_types', since: '4.5', mdl: 'MDL-82287')] function get_plugin_types($fullpaths = true) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); global $CFG; $types = core_component::get_plugin_types(); @@ -112,7 +112,7 @@ function get_plugin_types($fullpaths = true) { */ #[\core\attribute\deprecated('core_component::get_plugin_list', since: '4.5', mdl: 'MDL-82287')] function get_plugin_list($plugintype) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); if ($plugintype === '') { $plugintype = 'mod'; @@ -137,7 +137,7 @@ function get_plugin_list($plugintype) { */ #[\core\attribute\deprecated('core_component::get_plugin_list_with_class', since: '4.5', mdl: 'MDL-82287')] function get_plugin_list_with_class($plugintype, $class, $file) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return core_component::get_plugin_list_with_class($plugintype, $class, $file); } @@ -151,7 +151,7 @@ function get_plugin_list_with_class($plugintype, $class, $file) { */ #[\core\attribute\deprecated('core_component::get_plugin_directory', since: '4.5', mdl: 'MDL-82287')] function get_plugin_directory($plugintype, $name) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); if ($plugintype === '') { $plugintype = 'mod'; } @@ -168,7 +168,7 @@ function get_plugin_directory($plugintype, $name) { */ #[\core\attribute\deprecated('core_component::normalize_component', since: '4.5', mdl: 'MDL-82287')] function normalize_component($component) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return core_component::normalize_component($component); } @@ -182,7 +182,7 @@ function normalize_component($component) { */ #[\core\attribute\deprecated('core_component::get_component_directory', since: '4.5', mdl: 'MDL-82287')] function get_component_directory($component) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return core_component::get_component_directory($component); } @@ -191,7 +191,7 @@ function get_component_directory($component) { */ #[\core\attribute\deprecated('\core\context::instance', since: '2.2', mdl: 'MDL-34472', final: true)] function get_context_instance() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -199,7 +199,7 @@ function get_context_instance() { */ #[\core\attribute\deprecated('Not replaced', since: '2.0', mdl: 'MDL-19756', final: true)] function can_use_rotated_text() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -207,7 +207,7 @@ function can_use_rotated_text() { */ #[\core\attribute\deprecated('\core\context\system::instance', since: '2.2', mdl: 'MDL-34472', final: true)] function get_system_context() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -218,7 +218,7 @@ function get_system_context() { */ #[\core\attribute\deprecated('OUTPUT->[l|r]arrow', since: '2.0', mdl: 'MDL-19756', final: true)] function print_arrow() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -226,7 +226,7 @@ function print_arrow() { */ #[\core\attribute\deprecated('category_action_bar tertiary navigation', since: '4.0', mdl: 'MDL-73462', final: true)] function print_course_request_buttons() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -234,7 +234,7 @@ function print_course_request_buttons() { */ #[\core\attribute\deprecated('\core\cron::run_main_process()', since: '4.2', mdl: 'MDL-77186', final: true)] function cron_run() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -242,7 +242,7 @@ function cron_run() { */ #[\core\attribute\deprecated('\core\cron::run_scheduled_tasks()', since: '4.2', mdl: 'MDL-77186', final: true)] function cron_run_scheduled_tasks() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -250,7 +250,7 @@ function cron_run_scheduled_tasks() { */ #[\core\attribute\deprecated('\core\cron::run_adhoc_tasks()', since: '4.2', mdl: 'MDL-77186', final: true)] function cron_run_adhoc_tasks() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -258,7 +258,7 @@ function cron_run_adhoc_tasks() { */ #[\core\attribute\deprecated('\core\cron::run_inner_scheduled_task()', since: '4.2', mdl: 'MDL-77186', final: true)] function cron_run_inner_scheduled_task() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -266,7 +266,7 @@ function cron_run_inner_scheduled_task() { */ #[\core\attribute\deprecated('\core\cron::run_inner_adhoc_task()', since: '4.2', mdl: 'MDL-77186', final: true)] function cron_run_inner_adhoc_task() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -275,7 +275,7 @@ function cron_run_inner_adhoc_task() { */ #[\core\attribute\deprecated('\core\cron::set_process_title()', since: '4.2', mdl: 'MDL-77186', final: true)] function cron_set_process_title() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -283,7 +283,7 @@ function cron_set_process_title() { */ #[\core\attribute\deprecated('\core\cron::trace_time_and_memory()', since: '4.2', mdl: 'MDL-77186', final: true)] function cron_trace_time_and_memory() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -291,7 +291,7 @@ function cron_trace_time_and_memory() { */ #[\core\attribute\deprecated('\core\cron::prepare_core_renderer()', since: '4.2', mdl: 'MDL-77186', final: true)] function cron_prepare_core_renderer() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -299,7 +299,7 @@ function cron_prepare_core_renderer() { */ #[\core\attribute\deprecated('\core\cron::setup_user()', since: '4.2', mdl: 'MDL-77837', final: true)] function cron_setup_user() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -307,7 +307,7 @@ function cron_setup_user() { */ #[\core\attribute\deprecated(since: '4.3', mdl: 'MDL-77837', final: true)] function badges_get_oauth2_service_options() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -320,7 +320,7 @@ function badges_get_oauth2_service_options() { final: true, )] function theme_is_device_locked() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -333,7 +333,7 @@ function theme_is_device_locked() { final: true, )] function theme_get_locked_theme_for_device() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -347,7 +347,7 @@ function theme_get_locked_theme_for_device() { final: true, )] function random_bytes_emulate() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -390,7 +390,7 @@ function rc4decrypt($data) { */ #[\core\attribute\deprecated(\core\encryption::class, since: '4.5', mdl: 'MDL-81940')] function endecrypt($pwd, $data, $case) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); if ($case == 'de') { $data = urldecode($data); @@ -444,7 +444,7 @@ function endecrypt($pwd, $data, $case) { */ #[\core\attribute\deprecated('This method should not be used', since: '4.5', mdl: 'MDL-80275', final: true)] function disable_output_buffering(): void { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } @@ -464,7 +464,7 @@ function disable_output_buffering(): void { */ #[\core\attribute\deprecated('This method should not be used', since: '4.5', mdl: 'MDL-82157')] function print_grade_menu($courseid, $name, $current, $includenograde=true, $return=false) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); global $OUTPUT; $output = ''; @@ -511,7 +511,7 @@ function print_grade_menu($courseid, $name, $current, $includenograde=true, $ret reason: 'It is no longer used', )] function reset_password_and_mail($user) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); global $CFG; $site = get_site(); @@ -558,7 +558,7 @@ function reset_password_and_mail($user) { final: true, )] function plagiarism_get_file_results(): void { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -571,7 +571,7 @@ function plagiarism_get_file_results(): void { final: true, )] function plagiarism_update_status(): void { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -590,7 +590,7 @@ function plagiarism_update_status(): void { reason: 'The function is no longer used with the removal of the unused and non-functioning admin/process_email.php.', )] function moodle_process_email($modargs, $body) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); global $DB; // The first char should be an unencoded letter. We'll take this as an action. @@ -675,7 +675,7 @@ function question_make_default_categories($contexts): object { */ #[\core\attribute\deprecated('This method should not be used', since: '5.0', mdl: 'MDL-71378')] function question_delete_course($course, $notused = false): bool { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); $coursecontext = context_course::instance($course->id); question_delete_context($coursecontext->id); @@ -696,7 +696,7 @@ function question_delete_course($course, $notused = false): bool { #[\core\attribute\deprecated('This method should not be used', since: '5.0', mdl: 'MDL-71378')] function question_delete_course_category($category, $newcategory, $notused = false): bool { global $DB; - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); $context = context_coursecat::instance($category->id); if (empty($newcategory)) { @@ -750,7 +750,7 @@ function question_delete_course_category($category, $newcategory, $notused = fal reason: 'Remove all the old php version checks from core', )] function check_igbinary322_version(environment_results $result) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return null; } @@ -759,7 +759,7 @@ function check_igbinary322_version(environment_results $result) { */ #[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-79313', final: true)] function calendar_top_controls() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -767,7 +767,7 @@ function calendar_top_controls() { */ #[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-79432', final: true)] function calendar_get_link_previous() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -775,7 +775,7 @@ function calendar_get_link_previous() { */ #[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-79432', final: true)] function calendar_get_link_next() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -795,7 +795,7 @@ function calendar_get_link_next() { mdl: 'MDL-79434' )] function calendar_sub_month($month, $year) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return \core_calendar\type_factory::get_calendar_instance()->get_prev_month($year, $month); } @@ -816,7 +816,7 @@ function calendar_sub_month($month, $year) { mdl: 'MDL-84657' )] function calendar_add_month($month, $year) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return \core_calendar\type_factory::get_calendar_instance()->get_next_month($year, $month); } @@ -849,6 +849,6 @@ function calendar_add_month($month, $year) { reason: 'GD is a strict requirement, so use imagecopyresampled() instead.' )] function imagecopybicubic($dst_img, $src_img, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return imagecopyresampled($dst_img, $src_img, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h); } diff --git a/lib/dml/moodle_database.php b/lib/dml/moodle_database.php index ce35d8a84a8..aa2805c273e 100644 --- a/lib/dml/moodle_database.php +++ b/lib/dml/moodle_database.php @@ -2880,7 +2880,7 @@ abstract class moodle_database { reason: 'Renamed' )] public function want_read_slave(): bool { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return false; } @@ -2906,7 +2906,7 @@ abstract class moodle_database { reason: 'Renamed' )] public function perf_get_reads_slave(): int { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return 0; } diff --git a/lib/dml/moodle_read_slave_trait.php b/lib/dml/moodle_read_slave_trait.php index 16981a178f2..c6a5cfcd992 100644 --- a/lib/dml/moodle_read_slave_trait.php +++ b/lib/dml/moodle_read_slave_trait.php @@ -160,7 +160,7 @@ trait moodle_read_slave_trait { reason: 'Renamed trait' )] public function connect($dbhost, $dbuser, $dbpass, $dbname, $prefix, ?array $dboptions = null) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); $this->pdbhost = $dbhost; $this->pdbuser = $dbuser; $this->pdbpass = $dbpass; @@ -288,7 +288,7 @@ trait moodle_read_slave_trait { reason: 'Renamed trait' )] public function want_read_slave(): bool { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return $this->wantreadslave; } @@ -305,7 +305,7 @@ trait moodle_read_slave_trait { reason: 'Renamed trait' )] public function perf_get_reads_slave(): int { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return $this->readsslave; } @@ -322,7 +322,7 @@ trait moodle_read_slave_trait { reason: 'Renamed trait' )] public function start_delegated_transaction() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); $this->set_dbhwrite(); return parent::start_delegated_transaction(); } @@ -457,7 +457,7 @@ trait moodle_read_slave_trait { reason: 'Renamed trait' )] public function commit_delegated_transaction(moodle_transaction $transaction) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); if ($this->written) { // Adjust the written time. $now = microtime(true); diff --git a/lib/enrollib.php b/lib/enrollib.php index 05a0e7e508b..1a4d05aa9c1 100644 --- a/lib/enrollib.php +++ b/lib/enrollib.php @@ -2736,7 +2736,7 @@ abstract class enrol_plugin { */ #[\core\attribute\deprecated(null, reason: 'Replaced with hooks', since: '4.4', mdl: 'MDL-78551', final: true)] public function update_communication(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/lib/listlib.php b/lib/listlib.php index 9e9cd357b54..4bf9d451086 100644 --- a/lib/listlib.php +++ b/lib/listlib.php @@ -101,7 +101,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function __construct($type='ul', $attributes='', $editable = false, $pageurl=null, $page = 0, $pageparamname = 'page', $itemsperpage = 20) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $PAGE; $this->editable = $editable; @@ -126,7 +126,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function to_html($indent=0, $extraargs=array()) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); if (count($this->items)) { $tabs = str_repeat("\t", $indent); $first = true; @@ -171,7 +171,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function find_item($id, $suppresserror = false) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); if (isset($this->items)) { foreach ($this->items as $key => $child) { if ($child->id == $id) { @@ -202,7 +202,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function add_item($item) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $this->items[] = $item; } @@ -215,7 +215,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function set_parent($parent) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $this->parentitem = $parent; } @@ -232,7 +232,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function list_from_records($paged = false, $offset = 0) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $this->paged = $paged; $this->offset = $offset; $this->get_records(); @@ -296,7 +296,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function display_page_numbers() { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $html = ''; $topcount = count($this->items); $this->pagecount = (integer) ceil(($topcount + $this->offset)/ QUESTION_PAGE_LENGTH ); @@ -325,7 +325,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function get_items_peers($itemid) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $itemref = $this->find_item($itemid); $peerids = $itemref->parentlist->get_child_ids(); return $peerids; @@ -339,7 +339,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function get_child_ids() { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $childids = array(); foreach ($this->items as $child) { $childids[] = $child->id; @@ -357,7 +357,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function get_top_level_parent_id($item) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return 0; // Top level items have no parent. } @@ -370,7 +370,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function move_item_up_down($direction, $id) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $peers = $this->get_items_peers($id); $itemkey = array_search($id, $peers); switch ($direction) { @@ -407,7 +407,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function reorder_peers($peers) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $DB; foreach ($peers as $key => $peer) { $DB->set_field($this->table, "sortorder", $key, array("id"=>$peer)); @@ -423,7 +423,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function move_item_left($id) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $DB; $item = $this->find_item($id); @@ -452,7 +452,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function move_item_right($id) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $DB; $peers = $this->get_items_peers($id); @@ -484,7 +484,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function process_actions($left, $right, $moveup, $movedown) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); //should this action be processed by this list object? if (!(array_key_exists($left, $this->records) || array_key_exists($right, $this->records) || array_key_exists($moveup, $this->records) || array_key_exists($movedown, $this->records))) { return false; @@ -532,7 +532,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function item_is_first_on_page($itemid) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return $this->page && isset($this->items[$this->firstitem]) && $itemid == $this->items[$this->firstitem]->id; } @@ -545,7 +545,7 @@ abstract class moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function item_is_last_on_page($itemid) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return $this->page && isset($this->items[$this->lastitem]) && $itemid == $this->items[$this->lastitem]->id; } @@ -592,7 +592,7 @@ abstract class list_item { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function __construct($item, $parent, $attributes = '', $display = true) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $this->item = $item; if (is_object($this->item)) { $this->id = $this->item->id; @@ -613,7 +613,7 @@ abstract class list_item { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function item_html($extraargs = array()) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); if (is_string($this->item)) { $html = $this->item; } elseif (is_object($this->item)) { @@ -635,7 +635,7 @@ abstract class list_item { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function to_html($indent = 0, $extraargs = array()) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); if (!$this->display) { return ''; } @@ -660,7 +660,7 @@ abstract class list_item { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function set_icon_html($first, $last, $lastitem) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $CFG; $strmoveup = get_string('moveup'); $strmovedown = get_string('movedown'); @@ -721,7 +721,7 @@ abstract class list_item { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function image_icon($action, $url, $icon) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $OUTPUT; return '' . $OUTPUT->pix_icon('t/' . $icon, $action) . ' '; @@ -735,7 +735,7 @@ abstract class list_item { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function image_spacer() { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $OUTPUT; return $OUTPUT->spacer(); } @@ -750,7 +750,7 @@ abstract class list_item { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function create_children(&$records, &$children, $thisrecordid) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); //keys where value is $thisrecordid $thischildren = moodle_array_keys_filter($children, $thisrecordid); foreach ($thischildren as $child) { @@ -770,7 +770,7 @@ abstract class list_item { * @todo Final removal in Moodle 6.0 MDL-80804. */ public function set_parent($parent) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $this->parentlist = $parent; } } diff --git a/lib/navigationlib.php b/lib/navigationlib.php index 9d2ddec02e9..141fe053781 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -2536,7 +2536,7 @@ class global_navigation extends navigation_node { mdl: 'MDL-82845', )] protected function load_section_activities(navigation_node $sectionnode, $sectionnumber, array $activities, $course = null) { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); if (!is_object($course)) { $activity = reset($activities); $courseid = $activity->course; diff --git a/mnet/peer.php b/mnet/peer.php index c54c8ef5614..3707f317b14 100644 --- a/mnet/peer.php +++ b/mnet/peer.php @@ -322,6 +322,6 @@ class mnet_peer { */ #[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-77341', final: true)] public function get_public_key(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } } diff --git a/mod/assign/classes/output/renderer.php b/mod/assign/classes/output/renderer.php index dfc510cc0dc..54f1b589d92 100644 --- a/mod/assign/classes/output/renderer.php +++ b/mod/assign/classes/output/renderer.php @@ -1231,7 +1231,7 @@ class renderer extends \plugin_renderer_base { reason: 'The assign_course_index_summary class is not used anymore.', )] public function render_assign_course_index_summary(\assign_course_index_summary $indexsummary) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $o = ''; diff --git a/mod/assign/feedbackplugin.php b/mod/assign/feedbackplugin.php index cee9dd6c163..ab432c5dd0b 100644 --- a/mod/assign/feedbackplugin.php +++ b/mod/assign/feedbackplugin.php @@ -182,7 +182,7 @@ abstract class assign_feedback_plugin extends assign_plugin { */ #[\core\attribute\deprecated('get_grading_batch_operation_details', since: '4.5', mdl: 'MDL-80750')] public function get_grading_batch_operations() { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return array_column(static::get_grading_batch_operation_details(), 'confirmationtitle', 'key'); } diff --git a/mod/assign/gradingbatchoperationsform.php b/mod/assign/gradingbatchoperationsform.php index 382e0d40020..cd705f8cd06 100644 --- a/mod/assign/gradingbatchoperationsform.php +++ b/mod/assign/gradingbatchoperationsform.php @@ -55,7 +55,7 @@ class mod_assign_grading_batch_operations_form extends moodleform { mdl: 'MDL-80750' )] public function definition() { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $CFG; $mform = $this->_form; diff --git a/mod/assign/gradingtable.php b/mod/assign/gradingtable.php index b81ee619e01..398a2f90644 100644 --- a/mod/assign/gradingtable.php +++ b/mod/assign/gradingtable.php @@ -887,7 +887,7 @@ class assign_grading_table extends table_sql implements renderable { reason: 'Picture column is merged with fullname column' )] public function col_picture(stdClass $row) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); return $this->output->user_picture($row); } @@ -1365,7 +1365,7 @@ class assign_grading_table extends table_sql implements renderable { public function col_userid(stdClass $row) { global $USER; - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $edit = ''; $actions = array(); diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php index bd9c4f4bea1..8f900529aee 100644 --- a/mod/assign/locallib.php +++ b/mod/assign/locallib.php @@ -7393,7 +7393,7 @@ class assign { mdl: 'MDL-82681', )] protected function process_save_grading_options() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/mod/assign/renderable.php b/mod/assign/renderable.php index 976b92c00a1..2f6263afb87 100644 --- a/mod/assign/renderable.php +++ b/mod/assign/renderable.php @@ -652,7 +652,7 @@ class assign_course_index_summary implements renderable { reason: 'The assign_course_index_summary class is not used anymore.', )] public function __construct($usesections, $courseformatname) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $this->usesections = $usesections; $this->courseformatname = $courseformatname; } @@ -677,7 +677,7 @@ class assign_course_index_summary implements renderable { reason: 'The assign_course_index_summary class is not used anymore.', )] public function add_assign_info($cmid, $cmname, $sectionname, $timedue, $submissioninfo, $gradeinfo, $cangrade = false) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $this->assignments[] = ['cmid' => $cmid, 'cmname' => $cmname, 'sectionname' => $sectionname, diff --git a/mod/book/deprecatedlib.php b/mod/book/deprecatedlib.php index dbd00006d08..88c55991a12 100644 --- a/mod/book/deprecatedlib.php +++ b/mod/book/deprecatedlib.php @@ -27,5 +27,5 @@ */ #[\core\attribute\deprecated('book_get_nav_classes', since: '4.4', final: true)] function book_get_nav_classes() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } diff --git a/mod/data/deprecatedlib.php b/mod/data/deprecatedlib.php index 54650a7662c..e48867b8838 100644 --- a/mod/data/deprecatedlib.php +++ b/mod/data/deprecatedlib.php @@ -32,7 +32,7 @@ final: true, )] function data_print_template(): void { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -40,7 +40,7 @@ function data_print_template(): void { */ #[\core\attribute\deprecated('mod_data\preset::get_name_from_plugin()', since: '4.1', mdl: 'MDL-75148', final: true)] function data_preset_name(): void { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -48,7 +48,7 @@ function data_preset_name(): void { */ #[\core\attribute\deprecated('mod_data\manager::get_available_presets()', since: '4.1', mdl: 'MDL-75148', final: true)] function data_get_available_presets(): void { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -56,7 +56,7 @@ function data_get_available_presets(): void { */ #[\core\attribute\deprecated('mod_data\manager::get_available_saved_presets()', since: '4.1', mdl: 'MDL-75148', final: true)] function data_get_available_site_presets(): void { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -64,7 +64,7 @@ function data_get_available_site_presets(): void { */ #[\core\attribute\deprecated('mod_data\preset::delete()', since: '4.1', mdl: 'MDL-75187', final: true)] function data_delete_site_preset(): void { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -72,7 +72,7 @@ function data_delete_site_preset(): void { */ #[\core\attribute\deprecated('mod_data\preset::save()', since: '4.1', mdl: 'MDL-75142', final: true)] function data_presets_save(): void { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -80,7 +80,7 @@ function data_presets_save(): void { */ #[\core\attribute\deprecated('mod_data\preset::generate_preset_xml()', since: '4.1', mdl: 'MDL-75142', final: true)] function data_presets_generate_xml(): void { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -88,7 +88,7 @@ function data_presets_generate_xml(): void { */ #[\core\attribute\deprecated('mod_data\preset::export()', since: '4.1', mdl: 'MDL-75142', final: true)] function data_presets_export(): void { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -96,7 +96,7 @@ function data_presets_export(): void { */ #[\core\attribute\deprecated('mod_data\preset::can_manage()', since: '4.1', mdl: 'MDL-75187', final: true)] function data_user_can_delete_preset(): void { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -104,7 +104,7 @@ function data_user_can_delete_preset(): void { */ #[\core\attribute\deprecated('mod_data\manager::set_module_viewed', since: '4.1', mdl: 'MDL-75146', final: true)] function data_view(): void { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** @@ -112,7 +112,7 @@ function data_view(): void { */ #[\core\attribute\deprecated('mod_data\preset::is_directory_a_preset()', since: '4.1', mdl: 'MDL-75148', final: true)] function is_directory_a_preset(): void { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } /** diff --git a/mod/data/renderer.php b/mod/data/renderer.php index e5833b45f7d..9ec74df471d 100644 --- a/mod/data/renderer.php +++ b/mod/data/renderer.php @@ -33,7 +33,7 @@ class mod_data_renderer extends plugin_renderer_base { */ #[\core\attribute\deprecated('mod_data_renderer::importing_preset()', since: '4.1', mdl: 'MDL-75140', final: true)] public function import_setting_mappings(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -162,7 +162,7 @@ class mod_data_renderer extends plugin_renderer_base { */ #[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.5')] public function render_fields_footer(manager $manager): string { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); $cm = $manager->get_coursemodule(); $pageurl = new moodle_url('/mod/data/templates.php', ['id' => $cm->id]); diff --git a/mod/feedback/classes/output/renderer.php b/mod/feedback/classes/output/renderer.php index ab5558a179a..f7524a31ce6 100644 --- a/mod/feedback/classes/output/renderer.php +++ b/mod/feedback/classes/output/renderer.php @@ -48,7 +48,7 @@ class renderer extends plugin_renderer_base { */ #[\core\attribute\deprecated(replacement: null, since: '4.5')] public function create_template_form(int $id) { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); return $this->render_from_template('mod_feedback/create_template', ['id' => $id]); } diff --git a/mod/feedback/deprecatedlib.php b/mod/feedback/deprecatedlib.php index 32e9b038ab0..fde0df01845 100644 --- a/mod/feedback/deprecatedlib.php +++ b/mod/feedback/deprecatedlib.php @@ -31,6 +31,6 @@ #[\core\attribute\deprecated('is_role_switched', since: '4.5', mdl: 'MDL-72424')] function feedback_check_is_switchrole(): bool { global $USER; - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return isset($USER->switchrole) && is_array($USER->switchrole) && count($USER->switchrole) > 0; } diff --git a/mod/folder/renderer.php b/mod/folder/renderer.php index b1b4d28b4eb..375b9d0cd33 100644 --- a/mod/folder/renderer.php +++ b/mod/folder/renderer.php @@ -95,7 +95,7 @@ class mod_folder_renderer extends plugin_renderer_base { */ #[\core\attribute\deprecated('renderable_tree_elements()', since: '4.3', mdl: 'MDL-78847', final: true)] protected function htmllize_tree() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/mod/imscp/deprecatedlib.php b/mod/imscp/deprecatedlib.php index af71873a999..2ef09d2e41b 100644 --- a/mod/imscp/deprecatedlib.php +++ b/mod/imscp/deprecatedlib.php @@ -27,5 +27,5 @@ */ #[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.3', mdl: 'MDL-76953', final: true)] function imscp_libxml_disable_entity_loader() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } diff --git a/mod/lti/deprecatedlib.php b/mod/lti/deprecatedlib.php index 1146db19830..673806b9292 100644 --- a/mod/lti/deprecatedlib.php +++ b/mod/lti/deprecatedlib.php @@ -27,5 +27,5 @@ */ #[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.3', mdl: 'MDL-76953', final: true)] function lti_libxml_disable_entity_loader() { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } diff --git a/mod/quiz/classes/external.php b/mod/quiz/classes/external.php index 3098b701075..be770501c5e 100644 --- a/mod/quiz/classes/external.php +++ b/mod/quiz/classes/external.php @@ -407,7 +407,7 @@ class mod_quiz_external extends external_api { )] public static function get_user_attempts($quizid, $userid = 0, $status = 'finished', $includepreviews = false) { global $USER; - \core\deprecation::emit_deprecation_if_present(__METHOD__); + \core\deprecation::emit_deprecation(__METHOD__); $warnings = []; diff --git a/mod/quiz/classes/question/bank/qbank_helper.php b/mod/quiz/classes/question/bank/qbank_helper.php index 098afdd6a08..27cb149af57 100644 --- a/mod/quiz/classes/question/bank/qbank_helper.php +++ b/mod/quiz/classes/question/bank/qbank_helper.php @@ -53,7 +53,7 @@ class qbank_helper { mdl: 'MDL-77713') ] public static function get_version_options(int $questionid): array { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); return version_options::get_version_options($questionid); } diff --git a/mod/quiz/deprecatedlib.php b/mod/quiz/deprecatedlib.php index e0a6af910a7..ba20b959ad9 100644 --- a/mod/quiz/deprecatedlib.php +++ b/mod/quiz/deprecatedlib.php @@ -302,7 +302,7 @@ function quiz_calculate_best_attempt($quiz, $attempts) { */ #[\core\attribute\deprecated('override_manager::delete_override_by_id', since: '4.4', mdl: '80300', final: true)] function quiz_delete_override($quiz, $overrideid, $log = true) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); return true; } @@ -311,5 +311,5 @@ function quiz_delete_override($quiz, $overrideid, $log = true) { */ #[\core\attribute\deprecated('override_manager::delete_all_overrides', since: '4.4', mdl: '80300', final: true)] function quiz_delete_all_overrides($quiz, $log = true) { - \core\deprecation::emit_deprecation_if_present(__FUNCTION__); + \core\deprecation::emit_deprecation(__FUNCTION__); } diff --git a/mod/wiki/renderer.php b/mod/wiki/renderer.php index 514d2794e95..aa81c6e5c62 100644 --- a/mod/wiki/renderer.php +++ b/mod/wiki/renderer.php @@ -240,7 +240,7 @@ class mod_wiki_renderer extends plugin_renderer_base { */ #[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-72413', final: true)] public function wiki_info() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } public function tabs($page, $tabitems, $options) { diff --git a/question/bank/bulkmove/classes/helper.php b/question/bank/bulkmove/classes/helper.php index 9b718ee6a24..0a2b88e2aa4 100644 --- a/question/bank/bulkmove/classes/helper.php +++ b/question/bank/bulkmove/classes/helper.php @@ -69,7 +69,7 @@ class helper { mdl: 'MDL-71378' )] public static function get_displaydata(array $addcontexts, \moodle_url $moveurl, \moodle_url $returnurl): array { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); $displaydata = []; $displaydata ['categorydropdown'] = \qbank_managecategories\helper::question_category_select_menu($addcontexts, false, 0, '', -1, true); diff --git a/question/bank/bulkmove/classes/output/renderer.php b/question/bank/bulkmove/classes/output/renderer.php index 4b23b2fc2da..7936cac6ec0 100644 --- a/question/bank/bulkmove/classes/output/renderer.php +++ b/question/bank/bulkmove/classes/output/renderer.php @@ -36,7 +36,7 @@ class renderer extends \plugin_renderer_base { */ #[\core\attribute\deprecated('qbank_bulkmove\output\bulk_move', since: '5.0', mdl: 'MDL-71378')] public function render_bulk_move_form($displaydata) { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); return $this->render_from_template('qbank_bulkmove/bulk_move', $displaydata); } diff --git a/question/bank/history/classes/helper.php b/question/bank/history/classes/helper.php index 834c93b6eec..b7002394422 100644 --- a/question/bank/history/classes/helper.php +++ b/question/bank/history/classes/helper.php @@ -39,7 +39,7 @@ class helper { */ #[\core\attribute\deprecated(replacement: 'qbank_history\helper::get_question_history_url', since: '5.0', mdl: 'MDL-71378')] public static function question_history_url(int $entryid, string $returnrul, int $courseid, ?string $filter): \moodle_url { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); $params = [ 'entryid' => $entryid, 'returnurl' => $returnrul, diff --git a/question/bank/history/classes/question_history_view.php b/question/bank/history/classes/question_history_view.php index 021811bc8d3..0f121cfbeb7 100644 --- a/question/bank/history/classes/question_history_view.php +++ b/question/bank/history/classes/question_history_view.php @@ -95,7 +95,7 @@ class question_history_view extends view { */ #[\core\attribute\deprecated('filtering objects', since: '4.3', mdl: 'MDL-72321', final: true)] protected function display_advanced_search_form($advancedsearch): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } public function allow_add_questions(): bool { diff --git a/question/bank/managecategories/classes/category_condition.php b/question/bank/managecategories/classes/category_condition.php index 18559c3a718..eafc71cba61 100644 --- a/question/bank/managecategories/classes/category_condition.php +++ b/question/bank/managecategories/classes/category_condition.php @@ -113,7 +113,7 @@ class category_condition extends condition { */ #[\core\attribute\deprecated('filtering objects', since: '4.3', mdl: 'MDL-72321', final: true)] public function display_options() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -121,7 +121,7 @@ class category_condition extends condition { */ #[\core\attribute\deprecated('foobar::blah()', since: '4.3', mdl: 'MDL-72321', final: true)] public function display_options_adv() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -129,7 +129,7 @@ class category_condition extends condition { */ #[\core\attribute\deprecated('core_question renderer', since: '4.3', mdl: 'MDL-72321', final: true)] protected function display_category_form($contexts, $pageurl, $current) { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -137,7 +137,7 @@ class category_condition extends condition { */ #[\core\attribute\deprecated('qbank_managecategories/choose_category template', since: '4.3', mdl: 'MDL-72321', final: true)] public static function print_choose_category_message(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -145,7 +145,7 @@ class category_condition extends condition { */ #[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-72321', final: true)] public static function get_current_category($categoryandcontext) { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -183,7 +183,7 @@ class category_condition extends condition { */ #[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-72321', final: true)] protected function print_category_info($category): string { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } public static function build_query_from_filter(array $filter): array { diff --git a/question/bank/managecategories/classes/helper.php b/question/bank/managecategories/classes/helper.php index affce3a6b47..ace4310fcf5 100644 --- a/question/bank/managecategories/classes/helper.php +++ b/question/bank/managecategories/classes/helper.php @@ -95,7 +95,7 @@ class helper { mdl: 'MDL-72397' )] public static function question_is_only_child_of_top_category_in_context(int $categoryid): bool { - \core\deprecation::emit_deprecation_if_present([__CLASS__, __FUNCTION__]); + \core\deprecation::emit_deprecation([__CLASS__, __FUNCTION__]); $manager = new category_manager(); return $manager->is_only_child_of_top_category_in_context($categoryid); } @@ -116,7 +116,7 @@ class helper { mdl: 'MDL-72397' )] public static function question_is_top_category(int $categoryid): bool { - \core\deprecation::emit_deprecation_if_present([__CLASS__, __FUNCTION__]); + \core\deprecation::emit_deprecation([__CLASS__, __FUNCTION__]); $manager = new category_manager(); return $manager->is_top_category($categoryid); } @@ -137,7 +137,7 @@ class helper { mdl: 'MDL-72397' )] public static function question_can_delete_cat(int $todelete): void { - \core\deprecation::emit_deprecation_if_present([__CLASS__, __FUNCTION__]); + \core\deprecation::emit_deprecation([__CLASS__, __FUNCTION__]); $manager = new category_manager(); $manager->require_can_delete_category($todelete); } diff --git a/question/bank/managecategories/classes/question_category_list.php b/question/bank/managecategories/classes/question_category_list.php index ced825233b7..74e0d5463fc 100644 --- a/question/bank/managecategories/classes/question_category_list.php +++ b/question/bank/managecategories/classes/question_category_list.php @@ -89,7 +89,7 @@ class question_category_list extends moodle_list { public function __construct($type='ul', $attributes='', $editable = false, $pageurl=null, $page = 0, $pageparamname = 'page', $itemsperpage = DEFAULT_QUESTIONS_PER_PAGE, $context = null) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); parent::__construct('ul', '', $editable, $pageurl, $page, 'cpage', $itemsperpage); $this->context = $context; } @@ -101,7 +101,7 @@ class question_category_list extends moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804 */ public function get_records(): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $this->records = helper::get_categories_for_contexts($this->context->id, $this->sortby); } @@ -115,7 +115,7 @@ class question_category_list extends moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804 */ public function get_top_level_parent_id($item): int { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); // Put the item at the highest level it can go. $topcategory = question_get_top_category($item->item->contextid, true); return $topcategory->id; @@ -133,7 +133,7 @@ class question_category_list extends moodle_list { * @todo Final removal in Moodle 6.0 MDL-80804 */ public function process_actions($left, $right, $moveup, $movedown): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $category = new stdClass(); if (!empty($left)) { // Moved Left (In to another category). diff --git a/question/bank/managecategories/classes/question_category_list_item.php b/question/bank/managecategories/classes/question_category_list_item.php index 00d012add20..193b66e7f8f 100644 --- a/question/bank/managecategories/classes/question_category_list_item.php +++ b/question/bank/managecategories/classes/question_category_list_item.php @@ -39,7 +39,7 @@ class question_category_list_item extends \list_item { * @deprecated MDL-72397 Since Moodle 4.5 */ public function set_icon_html($first, $last, $lastitem): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $CFG; $category = $this->item; $url = new moodle_url('/question/bank/managecategories/category.php', @@ -82,7 +82,7 @@ class question_category_list_item extends \list_item { * @deprecated MDL-72397 Since Moodle 4.5 */ public function item_html($extraargs = []): string { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $PAGE, $OUTPUT; $str = $extraargs['str']; $category = $this->item; diff --git a/question/bank/managecategories/classes/question_category_object.php b/question/bank/managecategories/classes/question_category_object.php index d2c4a1bc7bd..8aa0bb45f60 100644 --- a/question/bank/managecategories/classes/question_category_object.php +++ b/question/bank/managecategories/classes/question_category_object.php @@ -92,7 +92,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function __construct($page, $pageurl, $contexts, $currentcat, $defaultcategory, $todelete, $addcontexts) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $this->tab = str_repeat(' ', $this->tabsize); $this->str = new stdClass(); @@ -139,7 +139,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function initialize($page, $contexts, $currentcat, $defaultcategory, $todelete, $addcontexts): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $lastlist = null; foreach ($contexts as $context) { $this->editlists[$context->id] = @@ -176,7 +176,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function display_user_interface(): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); // Interface for editing existing categories. $this->output_edit_lists(); } @@ -194,7 +194,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function output_new_table(): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $this->catform->display(); } @@ -213,7 +213,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function output_edit_lists(): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $OUTPUT; echo $OUTPUT->heading_with_help(get_string('questioncategories', 'question'), 'editcategories', 'question'); @@ -247,7 +247,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function get_course_ids(array $categories): array { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $courseids = []; foreach ($categories as $key => $cat) { $courseids[$key] = $cat->course; @@ -272,7 +272,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function edit_single_category(int $categoryid): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); // Interface for adding a new category. global $DB; @@ -311,7 +311,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function set_viable_parents(array &$parentstrings, object $category): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); unset($parentstrings[$category->id]); if (isset($category->children)) { foreach ($category->children as $child) { @@ -336,7 +336,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function get_question_categories(?int $parent = null, string $sort = "sortorder ASC"): array { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $COURSE, $DB; if (is_null($parent)) { $categories = $DB->get_records('question_categories', ['course' => $COURSE->id], $sort); @@ -361,7 +361,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function delete_category(int $categoryid): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $CFG, $DB; helper::question_can_delete_cat($categoryid); if (!$category = $DB->get_record("question_categories", ["id" => $categoryid])) { // Security. @@ -395,7 +395,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function move_questions_and_delete_category(int $oldcat, int $newcat): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); helper::question_can_delete_cat($oldcat); $this->move_questions($oldcat, $newcat); $this->delete_category($oldcat); @@ -411,7 +411,7 @@ class question_category_object { * @deprecated No longer used by internal code and not recommended since Moodle 4.2 MDL-77299. */ public function display_move_form($questionsincategory, $category): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); debugging( 'display_move_form() is deprecated and no longer used by internal code.', DEBUG_DEVELOPER @@ -440,7 +440,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function move_questions(int $oldcat, int $newcat): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $questionids = $this->get_real_question_ids_in_category($oldcat); question_move_questions_to_category($questionids, $newcat); } @@ -470,7 +470,7 @@ class question_category_object { )] public function add_category($newparent, $newcategory, $newinfo, $return = false, $newinfoformat = FORMAT_HTML, $idnumber = null): int { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $DB; if (empty($newcategory)) { throw new moodle_exception('categorynamecantbeblank', 'question'); @@ -545,7 +545,7 @@ class question_category_object { )] public function update_category($updateid, $newparent, $newname, $newinfo, $newinfoformat = FORMAT_HTML, $idnumber = null, $redirect = true): void { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $CFG, $DB; if (empty($newname)) { throw new moodle_exception('categorynamecantbeblank', 'question'); @@ -640,7 +640,7 @@ class question_category_object { mdl: 'MDL-72397', )] public function get_real_question_ids_in_category(int $categoryid): array { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $DB; $sql = "SELECT q.id diff --git a/question/bank/statistics/classes/helper.php b/question/bank/statistics/classes/helper.php index 2a84d7bfc06..acb540703df 100644 --- a/question/bank/statistics/classes/helper.php +++ b/question/bank/statistics/classes/helper.php @@ -46,7 +46,7 @@ class helper { final: true )] public static function calculate_average_question_facility(int $questionid): ?float { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -59,7 +59,7 @@ class helper { final: true )] public static function calculate_average_question_discriminative_efficiency(int $questionid): ?float { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -72,7 +72,7 @@ class helper { final: true )] public static function calculate_average_question_discrimination_index(int $questionid): ?float { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/question/classes/local/bank/view.php b/question/classes/local/bank/view.php index f23c680351b..16ca97d686a 100644 --- a/question/classes/local/bank/view.php +++ b/question/classes/local/bank/view.php @@ -336,7 +336,7 @@ class view { final: true )] protected function init_search_conditions(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -945,7 +945,7 @@ class view { final: true )] protected function print_choose_category_message(): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -958,7 +958,7 @@ class view { final: true )] protected function get_current_category($categoryandcontext) { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -966,7 +966,7 @@ class view { */ #[\core\attribute\deprecated('filtering objects', since: '4.3', mdl: 'MDL-72321', final: true)] protected function display_options_form($showquestiontext): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -974,7 +974,7 @@ class view { */ #[\core\attribute\deprecated('filtering objects', since: '4.3', mdl: 'MDL-72321', final: true)] protected function display_advanced_search_form($advancedsearch): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -982,7 +982,7 @@ class view { */ #[\core\attribute\deprecated('filtering objects', since: '4.3', mdl: 'MDL-72321', final: true)] protected function display_showtext_checkbox($showquestiontext): void { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -1357,7 +1357,7 @@ class view { */ #[\core\attribute\deprecated('print_table()', since: '4.3', mdl: 'MDL-72321', final: true)] protected function start_table() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -1365,7 +1365,7 @@ class view { */ #[\core\attribute\deprecated('print_table()', since: '4.3', mdl: 'MDL-72321', final: true)] protected function end_table() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/question/renderer.php b/question/renderer.php index 4fbea54ae66..936d2957dc7 100644 --- a/question/renderer.php +++ b/question/renderer.php @@ -101,7 +101,7 @@ class core_question_bank_renderer extends plugin_renderer_base { final: true )] public function render_category_condition($displaydata) { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -109,7 +109,7 @@ class core_question_bank_renderer extends plugin_renderer_base { */ #[\core\attribute\deprecated(null, since: '4.3', mdl: 'MDL-72321', final: true)] public function render_category_condition_advanced($displaydata) { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -122,7 +122,7 @@ class core_question_bank_renderer extends plugin_renderer_base { final: true )] public function render_hidden_condition_advanced($displaydata) { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/question/type/questiontypebase.php b/question/type/questiontypebase.php index e1e72b77897..7800d16f0c5 100644 --- a/question/type/questiontypebase.php +++ b/question/type/questiontypebase.php @@ -1396,7 +1396,7 @@ class question_type { */ #[\core\attribute\deprecated(replacement: null, since: '5.0', mdl: 'MDL-71378')] public function generate_test($name, $courseid=null) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); $form = new stdClass(); $form->name = $name; $form->questiontextformat = 1; diff --git a/report/eventlist/classes/list_generator.php b/report/eventlist/classes/list_generator.php index fa7b6319bc9..9e367f9273c 100644 --- a/report/eventlist/classes/list_generator.php +++ b/report/eventlist/classes/list_generator.php @@ -77,7 +77,7 @@ class report_eventlist_list_generator { */ #[\core\attribute\deprecated('::get_all_events_list', since: '4.0', mdl: 'MDL-72498', final: true)] public static function get_core_events_list() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -135,7 +135,7 @@ class report_eventlist_list_generator { */ #[\core\attribute\deprecated('::get_all_events_list', since: '4.0', mdl: 'MDL-72498', final: true)] public static function get_non_core_event_list() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/reportbuilder/classes/local/entities/base.php b/reportbuilder/classes/local/entities/base.php index 5b8d4444ba7..e465efef0d8 100644 --- a/reportbuilder/classes/local/entities/base.php +++ b/reportbuilder/classes/local/entities/base.php @@ -68,7 +68,7 @@ abstract class base { */ #[\core\attribute\deprecated('::get_default_tables', since: '4.4', mdl: 'MDL-79397', final: true)] protected function get_default_table_aliases(): array { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); return []; } diff --git a/reportbuilder/classes/local/helpers/audience.php b/reportbuilder/classes/local/helpers/audience.php index dfb2e50fd8f..6067f6d5cb1 100644 --- a/reportbuilder/classes/local/helpers/audience.php +++ b/reportbuilder/classes/local/helpers/audience.php @@ -303,6 +303,6 @@ class audience { */ #[\core\attribute\deprecated('custom_report_audience_cards_exporter', since: '4.1', final: true)] public static function get_all_audiences_menu_types() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } } diff --git a/reportbuilder/classes/local/helpers/report.php b/reportbuilder/classes/local/helpers/report.php index 7a70fd28917..cf9df877a1a 100644 --- a/reportbuilder/classes/local/helpers/report.php +++ b/reportbuilder/classes/local/helpers/report.php @@ -535,7 +535,7 @@ class report { */ #[\core\attribute\deprecated('custom_report_column_cards_exporter', since: '4.1', final: true)] public static function get_available_columns() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/reportbuilder/classes/local/helpers/schedule.php b/reportbuilder/classes/local/helpers/schedule.php index d5126ae8af4..42a8ed5cad9 100644 --- a/reportbuilder/classes/local/helpers/schedule.php +++ b/reportbuilder/classes/local/helpers/schedule.php @@ -146,7 +146,7 @@ class schedule { */ #[\core\attribute\deprecated('report::get_report_row_count', since: '5.0', mdl: 'MDL-74488')] public static function get_schedule_report_count(model $schedule): int { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); return report::get_report_row_count($schedule->get('reportid')); } diff --git a/reportbuilder/classes/local/helpers/user_filter_manager.php b/reportbuilder/classes/local/helpers/user_filter_manager.php index 338794b455c..f3030eb168c 100644 --- a/reportbuilder/classes/local/helpers/user_filter_manager.php +++ b/reportbuilder/classes/local/helpers/user_filter_manager.php @@ -136,7 +136,7 @@ class user_filter_manager { */ #[\core\attribute\deprecated(null, reason: 'It is no longer used', mdl: 'MDL-83345', since: '5.0')] public static function get_all_for_user(int $userid): array { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); $prefs = []; diff --git a/reportbuilder/classes/output/renderer.php b/reportbuilder/classes/output/renderer.php index 9be567d0416..54e34500017 100644 --- a/reportbuilder/classes/output/renderer.php +++ b/reportbuilder/classes/output/renderer.php @@ -113,7 +113,7 @@ class renderer extends plugin_renderer_base { */ #[\core\attribute\deprecated('\core_reportbuilder\system_report::set_report_action', mdl: 'MDL-82936', since: '5.0')] public function render_new_report_button(): string { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); return html_writer::tag('button', get_string('newreport', 'core_reportbuilder'), [ 'class' => 'btn btn-primary my-auto', diff --git a/repository/lib.php b/repository/lib.php index 636a5f5f8b8..f4d5e4cc9ac 100644 --- a/repository/lib.php +++ b/repository/lib.php @@ -1789,7 +1789,7 @@ abstract class repository implements cacheable_object { */ #[\core\attribute\deprecated(null, reason: 'No longer used', since: '4.3', mdl: 'MDL-50272', final: true)] public function get_file_size() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/repository/onedrive/lib.php b/repository/onedrive/lib.php index baf5cf41574..f211cb50073 100644 --- a/repository/onedrive/lib.php +++ b/repository/onedrive/lib.php @@ -1020,7 +1020,7 @@ class repository_onedrive extends repository { */ #[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.0', final: true)] public static function can_import_skydrive_files() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** @@ -1028,7 +1028,7 @@ class repository_onedrive extends repository { */ #[\core\attribute\deprecated(null, reason: 'It is no longer used', since: '4.0', final: true)] public static function import_skydrive_files() { - \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); + \core\deprecation::emit_deprecation([self::class, __FUNCTION__]); } /** diff --git a/theme/classic/tests/behat/behat_theme_classic_behat_core_question.php b/theme/classic/tests/behat/behat_theme_classic_behat_core_question.php index b933916904e..947785a908e 100644 --- a/theme/classic/tests/behat/behat_theme_classic_behat_core_question.php +++ b/theme/classic/tests/behat/behat_theme_classic_behat_core_question.php @@ -38,7 +38,7 @@ class behat_theme_classic_behat_core_question extends behat_core_question { #[\core\attribute\deprecated('behat_core_question::i_add_a_question_filling_the_form_with()', since: '5.0', mdl: 'MDL-71378')] public function i_add_a_question_filling_the_form_with($questiontypename, TableNode $questiondata) { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); parent::i_add_a_question_filling_the_form_with($questiontypename, $questiondata); } } diff --git a/user/classes/table/participants_search.php b/user/classes/table/participants_search.php index c82117b0d2a..f78c03578e5 100644 --- a/user/classes/table/participants_search.php +++ b/user/classes/table/participants_search.php @@ -140,7 +140,7 @@ class participants_search { )] public function get_total_participants_count(string $additionalwhere = '', array $additionalparams = []): int { - \core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]); + \core\deprecation::emit_deprecation([$this, __FUNCTION__]); global $DB;