MDL-75952 general: Since php81, refection->setAccessible() is no-op
Refereces: - https://wiki.php.net/rfc/make-reflection-setaccessible-no-op - https://www.php.net/manual/en/reflectionproperty.setaccessible.php - https://www.php.net/manual/en/reflectionmethod.setaccessible.php As of PHP 8.1.0, calling this method has no effect; all methods are invokable by default. So, let's remove all uses from core, they are no-op.
This commit is contained in:
@@ -299,7 +299,6 @@ class question_engine_test extends advanced_testcase {
|
||||
$renderer = new \core_question_renderer($PAGE, 'core_question');
|
||||
$rc = new \ReflectionClass($renderer);
|
||||
$rcm = $rc->getMethod('number');
|
||||
$rcm->setAccessible(true);
|
||||
|
||||
$this->assertEquals($expected, $rcm->invoke($renderer, $value));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user