Issue #3174022 by andypost, alexpott: call_user_func_array() and named arguments in PHP 8

merge-requests/25/head
Lee Rowlands 2020-10-12 17:21:17 +10:00
parent eaf33de13e
commit ba28c93eff
No known key found for this signature in database
GPG Key ID: 2B829A3DF9204DC4
3 changed files with 4 additions and 3 deletions

View File

@ -97,7 +97,8 @@ trait DoTrustedCallbackTrait {
}
}
return call_user_func_array($callback, $args);
// @TODO Allow named arguments in https://www.drupal.org/node/3174150
return call_user_func_array($callback, array_values($args));
}
}

View File

@ -49,7 +49,7 @@ class SettingsTrayBlockFormTest extends SettingsTrayTestBase {
*/
public function testBlocks() {
foreach ($this->getBlockTests() as $test) {
call_user_func_array([$this, 'doTestBlocks'], $test);
call_user_func_array([$this, 'doTestBlocks'], array_values($test));
}
}

View File

@ -955,7 +955,7 @@ abstract class KernelTestBase extends TestCase implements ServiceProviderInterfa
// Modules have been collected in reverse class hierarchy order; modules
// defined by base classes should be sorted first. Then, merge the results
// together.
$modules = array_reverse($modules);
$modules = array_values(array_reverse($modules));
return call_user_func_array('array_merge_recursive', $modules);
}