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

TypeError Exception with Composer 2.3.0 #455

Closed
gilbertsoft opened this issue Mar 30, 2022 · 5 comments
Closed

TypeError Exception with Composer 2.3.0 #455

gilbertsoft opened this issue Mar 30, 2022 · 5 comments

Comments

@gilbertsoft
Copy link

When I run this command:

composer global exec mage deploy develop

I get the following output:

Changed current directory to /home/runner/.composer
Error: Composer\EventDispatcher\EventDispatcher::addListener(): Argument #2 ($listener) must be of type callable, string given, called in phar:///usr/local/bin/composer/src/Composer/Command/ExecCommand.php on line 93

In EventDispatcher.php line 403:
                                                                               
  [TypeError]                                                                  
  Composer\EventDispatcher\EventDispatcher::addListener(): Argument #2 ($list  
  ener) must be of type callable, string given, called in phar:///usr/local/b  
  in/composer/src/Composer/Command/ExecCommand.php on line 93                  
                                                                               

Exception trace:
  at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:403
 Composer\EventDispatcher\EventDispatcher->addListener() at phar:///usr/local/bin/composer/src/Composer/Command/ExecCommand.php:93
 Composer\Command\ExecCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:298
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:1015
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:299
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:334
 Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:130
 Composer\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Command/GlobalCommand.php:118
 Composer\Command\GlobalCommand->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:1015
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:299
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:334
 Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:130
 Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:83
 require() at /usr/local/bin/composer:29

exec [-l|--list] [--] [<binary> [<args>...]]

Error: Process completed with exit code 1.

The failed GH workflow can be found here https://github.com/TYPO3/get.typo3.org/runs/5754752804?check_suite_focus=true

@andres-montanez
Copy link
Owner

Hi, thanks!
Looks like a type issue regarding the PHP's version, most likely I'll migrate to PHP 8 with the new version.

@gilbertsoft
Copy link
Author

Had no issues with Composer 2.2.9 and PHP 8.1. Also reported the issue to Composer see composer/composer#10672

@gilbertsoft
Copy link
Author

@andres-montanez I got feedback from Composer and the issue is already fixed with the current snapshot. I suggest to close this issue with the next Composer release.

Tested with Composer 2.3-dev+f1e3ba74abf39791f0dc9b7e0c6492b40685e1d8 and works again.

https://github.com/TYPO3/get.typo3.org/runs/5758998915?check_suite_focus=true

@andres-montanez
Copy link
Owner

Allright! Best issue ever :)
Thanks @gilbertsoft !!

@gilbertsoft
Copy link
Author

gilbertsoft commented Mar 30, 2022

It's released https://github.com/composer/composer/releases/tag/2.3.2 so I'm going to close the issue here.

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

No branches or pull requests

2 participants