From 6f23ef183d75460cd7201685cadfe0bd3bf07325 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Tue, 7 Nov 2023 23:12:51 +0800 Subject: [PATCH] MDL-80005 core: Formally deprecate PARAM_CLEANFILE --- lib/classes/param.php | 6 ++++++ lib/moodlelib.php | 1 + lib/upgrade.txt | 1 + 3 files changed, 8 insertions(+) diff --git a/lib/classes/param.php b/lib/classes/param.php index 0c350a7078f..e33dba51ebd 100644 --- a/lib/classes/param.php +++ b/lib/classes/param.php @@ -299,7 +299,13 @@ enum param: string { /** * PARAM_CLEANFILE - deprecated alias of PARAM_FILE; originally was removing regional chars too + * @deprecated since 2.0 */ + #[deprecated( + 'param::CLEANFILE', + since: '2.0', + reason: 'Alias for PARAM_FILE', + )] case CLEANFILE = 'cleanfile'; /** diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 0669b3e9af2..89cb766244b 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -310,6 +310,7 @@ define('PARAM_TIMEZONE', \core\param::TIMEZONE->value); /** * PARAM_CLEANFILE - deprecated alias of PARAM_FILE; originally was removing regional chars too + * @deprecated since 2.0 */ define('PARAM_CLEANFILE', \core\param::CLEANFILE->value); diff --git a/lib/upgrade.txt b/lib/upgrade.txt index c64e2ba142f..63a4eb52ec2 100644 --- a/lib/upgrade.txt +++ b/lib/upgrade.txt @@ -31,6 +31,7 @@ information provided here is intended especially for developers. * A new \core\deprecation class can be used to inspect for deprecated attributes: - `\core\deprecation::is_deprecated(example::class);` - `\core\deprecation::emit_deprecation_if_present([self::class, 'some_method']);` +* Added missing deprecation for PARAM_CLEANFILE which was deprecated in Moodle 2.0. === 4.3 ===