Properly support PHP 8.0 Named Arguments
See https://wiki.php.net/rfc/named_params#internal_functions (implemented but not yet merged) An ArgumentCountError will be thrown when passing variadic arguments to a function with call_user_func_array() if extra unknown named arguments are encountered. Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in phar:///path/to/composer.phar/src/Composer/DependencyResolver/DefaultPolicy.php:84 (e.g. for `['phpunit/phpunit' => [72]]`)pull/9076/head
parent
5fceb4799a
commit
e5c7835d57
|
@ -81,7 +81,7 @@ class DefaultPolicy implements PolicyInterface
|
||||||
$literals = $this->pruneRemoteAliases($pool, $literals);
|
$literals = $this->pruneRemoteAliases($pool, $literals);
|
||||||
}
|
}
|
||||||
|
|
||||||
$selected = call_user_func_array('array_merge', $packages);
|
$selected = call_user_func_array('array_merge', array_values($packages));
|
||||||
|
|
||||||
// now sort the result across all packages to respect replaces across packages
|
// now sort the result across all packages to respect replaces across packages
|
||||||
usort($selected, function ($a, $b) use ($policy, $pool, $installedMap, $requiredPackage) {
|
usort($selected, function ($a, $b) use ($policy, $pool, $installedMap, $requiredPackage) {
|
||||||
|
|
Loading…
Reference in New Issue