Merge branch 'MDL-79890-403' of https://github.com/andrewnicols/moodle into MOODLE_403_STABLE
This commit is contained in:
@@ -102,7 +102,7 @@ class block extends base {
|
||||
*/
|
||||
public static function add_disabled_constraints_to_form(\MoodleQuickForm $mform) {
|
||||
$mform->hideIf('targetvalue_block', 'targettype', 'noteq',
|
||||
\tool_usertours\target::get_target_constant_for_class(get_class()));
|
||||
\tool_usertours\target::get_target_constant_for_class(self::class));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -92,7 +92,7 @@ class selector extends base {
|
||||
*/
|
||||
public static function add_disabled_constraints_to_form(\MoodleQuickForm $mform) {
|
||||
$mform->hideIf('targetvalue_selector', 'targettype', 'noteq',
|
||||
\tool_usertours\target::get_target_constant_for_class(get_class()));
|
||||
\tool_usertours\target::get_target_constant_for_class(self::class));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -81,7 +81,7 @@ class unattached extends base {
|
||||
* @param MoodleQuickForm $mform The form to add configuration to.
|
||||
*/
|
||||
public static function add_disabled_constraints_to_form(\MoodleQuickForm $mform) {
|
||||
$myvalue = \tool_usertours\target::get_target_constant_for_class(get_class());
|
||||
$myvalue = \tool_usertours\target::get_target_constant_for_class(self::class);
|
||||
|
||||
foreach (array_keys(self::$forcedsettings) as $settingname) {
|
||||
$mform->hideIf($settingname, 'targettype', 'eq', $myvalue);
|
||||
|
||||
@@ -53,6 +53,8 @@ Local changes (to reapply until upstream upgrades contain them):
|
||||
cd lib/google/src
|
||||
for file in `find . -name '*.php' `; do sed -i '/^class /i #[AllowDynamicProperties]' $file; done
|
||||
```
|
||||
* MDL-46563 - PHP 8.3 compliance
|
||||
- Converted use of `get_class()` to `static::class`
|
||||
|
||||
Information
|
||||
-----------
|
||||
|
||||
@@ -40,7 +40,7 @@ class Google_Http_REST
|
||||
$runner = new Google_Task_Runner(
|
||||
$client,
|
||||
sprintf('%s %s', $req->getRequestMethod(), $req->getUrl()),
|
||||
array(get_class(), 'doExecute'),
|
||||
array(self::class, 'doExecute'),
|
||||
array($client, $req)
|
||||
);
|
||||
|
||||
|
||||
@@ -1968,7 +1968,7 @@ class accesslib_test extends advanced_testcase {
|
||||
$mockedplugins->setAccessible(true);
|
||||
$plugins = $mockedplugins->getValue();
|
||||
$plugins['fake'] = [$pluginname => "{$CFG->dirroot}/lib/tests/fixtures/fakeplugins/$pluginname"];
|
||||
$mockedplugins->setValue($plugins);
|
||||
$mockedplugins->setValue(null, $plugins);
|
||||
update_capabilities('fake_access');
|
||||
$this->resetDebugging(); // We have debugging messages here that we need to get rid of.
|
||||
// End of the component loader mock.
|
||||
|
||||
@@ -52,13 +52,13 @@ trait subplugins_test_helper_trait {
|
||||
$mockedplugins->setAccessible(true);
|
||||
$plugins = $mockedplugins->getValue();
|
||||
$plugins[extension::BBB_EXTENSION_PLUGIN_NAME] = [$pluginname => $bbbextpath . "/$pluginname"];
|
||||
$mockedplugins->setValue($plugins);
|
||||
$mockedplugins->setValue(null, $plugins);
|
||||
|
||||
$mockedplugintypes = $mockedcomponent->getProperty('plugintypes');
|
||||
$mockedplugintypes->setAccessible(true);
|
||||
$pluginstypes = $mockedplugintypes->getValue();
|
||||
$pluginstypes[extension::BBB_EXTENSION_PLUGIN_NAME] = $bbbextpath;
|
||||
$mockedplugintypes->setValue($pluginstypes);
|
||||
$mockedplugintypes->setValue(null, $pluginstypes);
|
||||
|
||||
$fillclassmap = $mockedcomponent->getMethod('fill_classmap_cache');
|
||||
$fillclassmap->setAccessible(true);
|
||||
@@ -72,7 +72,7 @@ trait subplugins_test_helper_trait {
|
||||
$mockedsubplugins->setAccessible(true);
|
||||
$subplugins = $mockedsubplugins->getValue();
|
||||
$subplugins['mod_bigbluebuttonbn'][extension::BBB_EXTENSION_PLUGIN_NAME][] = $pluginname;
|
||||
$mockedsubplugins->setValue($subplugins);
|
||||
$mockedsubplugins->setValue(null, $subplugins);
|
||||
|
||||
// Now write the content of the cache in a file so we can use it later.
|
||||
$content = core_component::get_cache_content();
|
||||
@@ -149,7 +149,7 @@ trait subplugins_test_helper_trait {
|
||||
// Here we reset the plugin caches.
|
||||
$mockedplugintypes = $mockedcomponent->getProperty('plugintypes');
|
||||
$mockedplugintypes->setAccessible(true);
|
||||
$mockedplugintypes->setValue(null);
|
||||
$mockedplugintypes->setValue(null, null);
|
||||
$fillclassmap = $mockedcomponent->getMethod('init');
|
||||
$fillclassmap->setAccessible(true);
|
||||
$fillclassmap->invoke(null);
|
||||
|
||||
@@ -263,7 +263,7 @@ XPATH
|
||||
$mockedcomponent = new ReflectionClass(core_component::class);
|
||||
$mockedplugintypes = $mockedcomponent->getProperty('plugintypes');
|
||||
$mockedplugintypes->setAccessible(true);
|
||||
$mockedplugintypes->setValue(null);
|
||||
$mockedplugintypes->setValue(null, null);
|
||||
$init = $mockedcomponent->getMethod('init');
|
||||
$init->setAccessible(true);
|
||||
$init->invoke(null);
|
||||
|
||||
Reference in New Issue
Block a user