mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 19:36:41 +02:00
MDL-78635 mod: final removal of deprecated libxml method wrappers.
This commit is contained in:
parent
0888a6d324
commit
a65a1aac9d
7 changed files with 53 additions and 36 deletions
10
.upgradenotes/MDL-78635-2024100909025790.yml
Normal file
10
.upgradenotes/MDL-78635-2024100909025790.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
issueNumber: MDL-78635
|
||||||
|
notes:
|
||||||
|
mod_imscp:
|
||||||
|
- message: >-
|
||||||
|
Final removal of deprecated `imscp_libxml_disable_entity_loader`
|
||||||
|
function
|
||||||
|
type: removed
|
||||||
|
mod_lti:
|
||||||
|
- message: Final removal of deprecated `lti_libxml_disable_entity_loader` function
|
||||||
|
type: removed
|
31
mod/imscp/deprecatedlib.php
Normal file
31
mod/imscp/deprecatedlib.php
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
// This file is part of Moodle - http://moodle.org/
|
||||||
|
//
|
||||||
|
// Moodle is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// Moodle is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback methods for mod_imscp component
|
||||||
|
*
|
||||||
|
* @package mod_imscp
|
||||||
|
* @copyright 2024 Paul Holden <paulh@moodle.com>
|
||||||
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated since Moodle 4.3
|
||||||
|
*/
|
||||||
|
#[\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__);
|
||||||
|
}
|
|
@ -24,6 +24,8 @@
|
||||||
|
|
||||||
defined('MOODLE_INTERNAL') || die();
|
defined('MOODLE_INTERNAL') || die();
|
||||||
|
|
||||||
|
require_once(__DIR__ . '/deprecatedlib.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of features supported in IMS CP module
|
* List of features supported in IMS CP module
|
||||||
* @param string $feature FEATURE_xx constant for requested feature
|
* @param string $feature FEATURE_xx constant for requested feature
|
||||||
|
|
|
@ -264,23 +264,6 @@ function imscp_recursive_item($xmlitem, $level, $resources) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Wrapper for function libxml_disable_entity_loader() deprecated in PHP 8
|
|
||||||
*
|
|
||||||
* Method was deprecated in PHP 8 and it shows deprecation message. However it is still
|
|
||||||
* required in the previous versions on PHP. While Moodle supports both PHP 7 and 8 we need to keep it.
|
|
||||||
* @see https://php.watch/versions/8.0/libxml_disable_entity_loader-deprecation
|
|
||||||
*
|
|
||||||
* @param bool $value
|
|
||||||
* @return bool
|
|
||||||
*
|
|
||||||
* @deprecated since Moodle 4.3
|
|
||||||
*/
|
|
||||||
function imscp_libxml_disable_entity_loader(bool $value): bool {
|
|
||||||
debugging(__FUNCTION__ . '() is deprecated, please do not use it any more', DEBUG_DEVELOPER);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* File browsing support class
|
* File browsing support class
|
||||||
*
|
*
|
||||||
|
|
|
@ -30,3 +30,11 @@ function lti_get_shortcuts() {
|
||||||
'The callback get_shortcuts() is now removed. Please use get_course_content_items and get_all_content_items instead.'
|
'The callback get_shortcuts() is now removed. Please use get_course_content_items and get_all_content_items instead.'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated since Moodle 4.3
|
||||||
|
*/
|
||||||
|
#[\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__);
|
||||||
|
}
|
||||||
|
|
|
@ -48,6 +48,8 @@
|
||||||
|
|
||||||
defined('MOODLE_INTERNAL') || die;
|
defined('MOODLE_INTERNAL') || die;
|
||||||
|
|
||||||
|
require_once(__DIR__ . '/deprecatedlib.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of features supported in URL module
|
* List of features supported in URL module
|
||||||
* @param string $feature FEATURE_xx constant for requested feature
|
* @param string $feature FEATURE_xx constant for requested feature
|
||||||
|
|
|
@ -4586,23 +4586,4 @@ function lti_new_access_token($typeid, $scopes) {
|
||||||
$DB->insert_record('lti_access_tokens', $newtoken);
|
$DB->insert_record('lti_access_tokens', $newtoken);
|
||||||
|
|
||||||
return $newtoken;
|
return $newtoken;
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Wrapper for function libxml_disable_entity_loader() deprecated in PHP 8
|
|
||||||
*
|
|
||||||
* Method was deprecated in PHP 8 and it shows deprecation message. However it is still
|
|
||||||
* required in the previous versions on PHP. While Moodle supports both PHP 7 and 8 we need to keep it.
|
|
||||||
* @see https://php.watch/versions/8.0/libxml_disable_entity_loader-deprecation
|
|
||||||
*
|
|
||||||
* @param bool $value
|
|
||||||
* @return bool
|
|
||||||
*
|
|
||||||
* @deprecated since Moodle 4.3
|
|
||||||
*/
|
|
||||||
function lti_libxml_disable_entity_loader(bool $value): bool {
|
|
||||||
debugging(__FUNCTION__ . '() is deprecated, please do not use it any more', DEBUG_DEVELOPER);
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue