1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-24 09:55:33 +02:00

MDL-82427 core_filters: Deprecate filter.php

This commit is contained in:
Andrew Nicols 2024-07-10 14:47:04 +08:00
parent 8d284e3ce0
commit f5f883ef04
No known key found for this signature in database
GPG Key ID: 6D1E3157C8CFBF14
2 changed files with 8 additions and 1 deletions

@ -2,5 +2,5 @@ issueNumber: MDL-82427
notes:
core_filters:
- message: >-
Added support for autoloading of filters from `\filter_filtername\filter`. The existing class names are still supported.
Added support for autoloading of filters from `\filter_[filtername]\filter`. Existing classes should be renamed to use the new namespace.
type: improved

@ -139,6 +139,13 @@ class filter_manager {
$filterclassname = 'filter_' . $filtername;
if (class_exists($filterclassname)) {
debugging(
"Inclusion of filters from 'filter/{$filtername}/filter.php' " .
"using the '{$filterclassname}' class naming has been deprecated. " .
"Please rename your class to {$filterclass} and move it to 'filter/{$filtername}/classes/text_filter.php'. " .
"See MDL-82427 for more information.",
DEBUG_DEVELOPER,
);
return new $filterclassname($context, $localconfig);
}