Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly support PHP 8.0 Named Arguments (Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters) #9076

Merged
merged 1 commit into from
Jul 30, 2020

Conversation

TysonAndre
Copy link
Contributor

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]])


I'm proposing fixing this in composer 1.10 because this is a relatively straightforward fix, and composer otherwise does not warn when being run in php 8.0-dev.
I'm sorry if I missed any notes about no longer accepting patches for php 8.0 - I didn't see any other notes the readme for this branch.

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]]`)
@Seldaek Seldaek added this to the 1.10 milestone Jul 29, 2020
@Seldaek Seldaek merged commit 868aa10 into composer:1.10 Jul 30, 2020
@Seldaek
Copy link
Member

Seldaek commented Jul 30, 2020

Thanks

@sebastianbergmann
Copy link

@Seldaek Do you have an ETA for a new 1.10 release that has this fix? Thanks!

@Seldaek
Copy link
Member

Seldaek commented Aug 3, 2020

Now https://github.com/composer/composer/releases/tag/1.10.10

rxu added a commit to rxu/phpbb3 that referenced this pull request Aug 9, 2020
rxu added a commit to rxu/phpbb3 that referenced this pull request Aug 10, 2020
rxu added a commit to rxu/phpbb3 that referenced this pull request Aug 13, 2020
rxu added a commit to rxu/phpbb3 that referenced this pull request Aug 14, 2020
rxu added a commit to rxu/phpbb3 that referenced this pull request Aug 14, 2020
rxu added a commit to rxu/phpbb3 that referenced this pull request Aug 28, 2020
rxu added a commit to rxu/phpbb3 that referenced this pull request Sep 9, 2020
rxu added a commit to rxu/phpbb3 that referenced this pull request Sep 9, 2020
@HumayunSheikh
Copy link

HumayunSheikh commented Sep 21, 2021

Now https://github.com/composer/composer/releases/tag/1.10.10

after downloading it showing same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants