mirror of
https://github.com/moodle/moodle.git
synced 2025-08-02 07:39:54 +02:00
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:
parent
38a3310c92
commit
361dfe8145
134 changed files with 7 additions and 383 deletions
|
@ -281,7 +281,6 @@ class command_test extends \advanced_testcase {
|
|||
);
|
||||
|
||||
$execute = new ReflectionMethod($instance, 'execute');
|
||||
$execute->setAccessible(true);
|
||||
$execute->invoke($instance, $command);
|
||||
}
|
||||
|
||||
|
|
|
@ -447,7 +447,6 @@ class matrix_client_test extends \advanced_testcase {
|
|||
|
||||
$rc = new \ReflectionClass($instance);
|
||||
$rcm = $rc->getMethod('execute');
|
||||
$rcm->setAccessible(true);
|
||||
$result = $rcm->invoke($instance, $command);
|
||||
|
||||
$this->assertEquals(200, $result->getStatusCode());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue