To reproduce:
composer create-project symfony/skeleton foo && cd foo && composer require orm
Result:
Installing symfony/skeleton (v4.1.0)
- Installing symfony/skeleton (v4.1.0): Downloading (100%)
Created project in foo
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 21 installs, 0 updates, 0 removals
- Installing symfony/flex (v1.0.81): Downloading (100%)
Prefetching 20 packages 🎶
- Downloading (100%)
- Installing symfony/polyfill-mbstring (v1.8.0): Loading from cache
- Installing symfony/console (v4.1.1): Loading from cache
- Installing symfony/routing (v4.1.1): Loading from cache
- Installing symfony/yaml (v4.1.1): Loading from cache
- Installing symfony/framework-bundle (v4.1.1): Loading from cache
- Installing symfony/http-kernel (v4.1.1): Loading from cache
- Installing symfony/http-foundation (v4.1.1): Loading from cache
- Installing symfony/event-dispatcher (v4.1.1): Loading from cache
- Installing psr/log (1.0.2): Loading from cache
- Installing symfony/debug (v4.1.1): Loading from cache
- Installing symfony/finder (v4.1.1): Loading from cache
- Installing symfony/filesystem (v4.1.1): Loading from cache
- Installing psr/container (1.0.0): Loading from cache
- Installing symfony/dependency-injection (v4.1.1): Loading from cache
- Installing symfony/config (v4.1.1): Loading from cache
- Installing psr/simple-cache (1.0.1): Loading from cache
- Installing psr/cache (1.0.1): Loading from cache
- Installing symfony/cache (v4.1.1): Loading from cache
- Installing symfony/dotenv (v4.1.1): Loading from cache
Writing lock file
Generating autoload files
Symfony operations: 4 recipes (04c4a9fa1a98c2ae2e3cb3994af56bd7)
- Configuring symfony/flex (>=1.0): From github.com/symfony/recipes:master
- Configuring symfony/framework-bundle (>=3.3): From github.com/symfony/recipes:master
- Configuring symfony/console (>=3.3): From github.com/symfony/recipes:master
- Configuring symfony/routing (>=4.0): From github.com/symfony/recipes:master
Executing script cache:clear [OK]
Executing script assets:install public [OK]
Some files may have been created or updated to configure your new packages.
Please review, edit and commit them: these files are yours.
What's next?
* Run your application:
1. Change to the project directory
2. Create your code repository with the git init command
3. Execute the php -S 127.0.0.1:8000 -t public command
4. Browse to the http://localhost:8000/ URL.
Quit the server with CTRL-C.
Run composer require server --dev for a better web server.
* Read the documentation at https://symfony.com/doc
/app/foo
Using version ^1.0 for symfony/orm-pack
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Fatal error: Uncaught Error: Function name must be a string in /app/vendor/symfony/flex/src/ParallelDownloader.php:246
Stack trace:
#0 /app/vendor/symfony/flex/src/ParallelDownloader.php(84): Symfony\Flex\ParallelDownloader->getNext()
#1 phar:///usr/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code(452): Symfony\Flex\ParallelDownloader->download(Array, Object(Closure))
#2 [internal function]: Symfony\Flex\Flex_composer_tmp0->populateProvidersCacheDir(Object(Composer\Installer\InstallerEvent))
#3 phar:///usr/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(171): call_user_func(Array, Object(Composer\Installer\InstallerEvent))
#4 phar:///usr/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(135): Composer\EventDispatcher\EventDispatcher->doDispatch(Object(Composer\Installer\InstallerEvent))
#5 phar:///usr/bin/composer/src/Composer/Installer.php(470): Composer\EventDispatcher\EventDispatcher->dispatchInstallerEvent('pre-dependencie...', true, Object(Composer\DependencyResolver\D in /app/vendor/symfony/flex/src/ParallelDownloader.php on line 246
Note (re)running composer require orm produces the same error. nextCallback is NULL for some reason, but this is a bit to complex for my mind 🤪🧙🏼♂️
Same error for me. I have Composer 1.6.5, PHP version: 7.2.7-0ubuntu0.18.04.2, hirak/prestissimo 0.3.7 and phpstan/phpstan 0.10.1 installed.
Omg.... i wake and code.... broken on this error.....
Does it work again when you downgrade to Flex 1.0.80?
For us it does work after fixating on flex version 1.0.80.
Same here, 1.0.81 came with 2 bugs: this one and #382.
It seems that if you have private repos, #382 will affect you. If you don't use private repos, #381 will affect you: tested by removing all my private repo dependencies. Locking to 1.0.80 does fix both problems.
Same here, 1.0.80 works
I've just released 1.0.82 (which is the same as 1.0.80) as a hotfix.
I think this could as well be fixed by #384.
v1.0.83 is out with a fix, can you test and report?
Seems like the issue was fixed in 1.0.87, but is reintroduced in 1.0.88. Getting the error right away after I added a custom repository to my composer.json file.
@nicolas-grekas
OK, I reproduce, I'm on it.
Most helpful comment
I've just released 1.0.82 (which is the same as 1.0.80) as a hotfix.