Skip to content

composer fails in SF 4.2: " curl_multi_setopt(): CURLPIPE_HTTP1 is no longer supported " #515

Closed
@ghost

Description

I'm updating my v4.2 project. Composer's uptodate,

cd ~

which composer
	/usr/local/bin/composer

composer --version
	Composer version 1.8.6 2019-06-11 15:03:05

composer -vv self-update
	You are already using composer version 1.8.6 (stable channel).

but in my Symfony project,

	cd /src/www/test
	composer --version

	  [ErrorException]
	  curl_multi_setopt(): CURLPIPE_HTTP1 is no longer supported

	composer -vv self-update

		                                                              
		  [ErrorException]                                            
		  curl_multi_setopt(): CURLPIPE_HTTP1 is no longer supported  
		                                                              

		Exception trace:
		 () at /src/www/test/vendor/symfony/flex/src/CurlDownloader.php:49
		 Composer\Util\ErrorHandler::handle() at n/a:n/a
		 curl_multi_setopt() at /src/www/test/vendor/symfony/flex/src/CurlDownloader.php:49
		 Symfony\Flex\CurlDownloader->__construct() at /src/www/test/vendor/symfony/flex/src/ParallelDownloader.php:48
		 Symfony\Flex\ParallelDownloader->__construct() at /src/www/test/vendor/symfony/flex/src/Flex.php:108
		 Symfony\Flex\Flex->activate() at phar:///usr/local/bin/composer.phar/src/Composer/Plugin/PluginManager.php:236
		 Composer\Plugin\PluginManager->addPlugin() at phar:///usr/local/bin/composer.phar/src/Composer/Plugin/PluginManager.php:205
		 Composer\Plugin\PluginManager->registerPackage() at phar:///usr/local/bin/composer.phar/src/Composer/Plugin/PluginManager.php:261
		 Composer\Plugin\PluginManager->loadRepository() at phar:///usr/local/bin/composer.phar/src/Composer/Plugin/PluginManager.php:76
		 Composer\Plugin\PluginManager->loadInstalledPlugins() at phar:///usr/local/bin/composer.phar/src/Composer/Factory.php:384
		 Composer\Factory->createComposer() at phar:///usr/local/bin/composer.phar/src/Composer/Factory.php:576
		 Composer\Factory::create() at phar:///usr/local/bin/composer.phar/src/Composer/Console/Application.php:345
		 Composer\Console\Application->getComposer() at phar:///usr/local/bin/composer.phar/src/Composer/Console/Application.php:458
		 Composer\Console\Application->getPluginCommands() at phar:///usr/local/bin/composer.phar/src/Composer/Console/Application.php:156
		 Composer\Console\Application->doRun() at phar:///usr/local/bin/composer.phar/vendor/symfony/console/Application.php:117
		 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer.phar/src/Composer/Console/Application.php:104
		 Composer\Console\Application->run() at phar:///usr/local/bin/composer.phar/bin/composer:61
		 require() at /usr/local/bin/composer.phar:24

Activity

nicolas-grekas

nicolas-grekas commented on Jun 14, 2019

@nicolas-grekas
Member

Correct! Would you mind sending a PR to drop using the flag?

added a commit that references this issue on Jun 15, 2019

bug #517 remove deprecated CURLPIPE_HTTP1 support flag (hal869)

gundamftw

gundamftw commented on Dec 4, 2019

@gundamftw

Hi I'm also getting this exact same error as of today while trying to update from Symfony 4.2 to 5. My Composer version is 1.9.1.

diamondlee

diamondlee commented on Dec 9, 2019

@diamondlee

Wondering when this issue will be reopened and fixed

nicolas-grekas

nicolas-grekas commented on Dec 9, 2019

@nicolas-grekas
Member

this issue is already fixed, please upgrade.

diamondlee

diamondlee commented on Dec 9, 2019

@diamondlee

odd i am using symfony/flex 1.5.3 which is latest. so again i am wondering when this will be fixed or what is needed to resolve this issue
image

nicolas-grekas

nicolas-grekas commented on Dec 9, 2019

@nicolas-grekas
Member

you may have forgotten to upgrade your global flex install
compose global require symfony/flex ^1.5
BTW, don't hesitate to submit fixes next time, no need to wait when you can contribute them.

diamondlee

diamondlee commented on Dec 9, 2019

@diamondlee

interesting i did not read that https://symfony.com/doc/current/setup/flex.html. I am wondering if you could explain what this is doing then using composer update symfony/flex

diamondlee

diamondlee commented on Dec 9, 2019

@diamondlee

That did not fix anything i only got subsequent errors.

Symfony recipes are disabled: "symfony/flex" not found in the root composer.json
nicolas-grekas

nicolas-grekas commented on Dec 9, 2019

@nicolas-grekas
Member

That's not an error, just an info message.

4 remaining items

diamondlee

diamondlee commented on Dec 9, 2019

@diamondlee

@nicolas-grekas i will get the verbose output to check the file but the error is still
image
just seems odd that this also happens when you try and make a symfony skeleton project

ddegasperi

ddegasperi commented on Dec 10, 2019

@ddegasperi

@diamondlee I have just had the same error. After removing the var and the vendor folder it worked for me.
Another solution could be to run the install process without using the composer cache?

nd-brown

nd-brown commented on Dec 20, 2019

@nd-brown

I have just had the same error too. And find that problem in php version. I run into problem if I use php 7.4, but on php 7.3 everything works

diamondlee

diamondlee commented on Dec 20, 2019

@diamondlee

@nicolas-grekas according to the documentation found at https://curl.haxx.se/libcurl/c/CURLMOPT_PIPELINING.html it seems as if Since 7.62.0, CURLPIPE_MULTIPLEX is enabled by default. so in the construction of the flex CurlDownloader.php the line

curl_multi_setopt($mh, CURLMOPT_PIPELINING, /*CURLPIPE_MULTIPLEX*/ 2); 

could maybe be removed or updated to the correct constant? According the the stack trace produced by the composer command install this is where the problem is

Loading plugin Symfony\Flex\Flex

                                                              
  [ErrorException]                                            
  curl_multi_setopt(): CURLPIPE_HTTP1 is no longer supported  
                                                              

Exception trace:
 () at /builds/project/vendor/symfony/flex/src/CurlDownloader.php:49
 Composer\Util\ErrorHandler::handle() at n/a:n/a
 curl_multi_setopt() at /builds/project/vendor/symfony/flex/src/CurlDownloader.php:49
 Symfony\Flex\CurlDownloader->__construct() at /builds/project/vendor/symfony/flex/src/ParallelDownloader.php:48
 Symfony\Flex\ParallelDownloader->__construct() at /builds/project/vendor/symfony/flex/src/Flex.php:108
 Symfony\Flex\Flex->activate() at phar:///usr/bin/composer/src/Composer/Plugin/PluginManager.php:236
 Composer\Plugin\PluginManager->addPlugin() at phar:///usr/bin/composer/src/Composer/Plugin/PluginManager.php:205
 Composer\Plugin\PluginManager->registerPackage() at phar:///usr/bin/composer/src/Composer/Plugin/PluginManager.php:261
 Composer\Plugin\PluginManager->loadRepository() at phar:///usr/bin/composer/src/Composer/Plugin/PluginManager.php:76
 Composer\Plugin\PluginManager->loadInstalledPlugins() at phar:///usr/bin/composer/src/Composer/Factory.php:384
 Composer\Factory->createComposer() at phar:///usr/bin/composer/src/Composer/Factory.php:576
 Composer\Factory::create() at phar:///usr/bin/composer/src/Composer/Console/Application.php:345
 Composer\Console\Application->getComposer() at phar:///usr/bin/composer/src/Composer/Console/Application.php:458
 Composer\Console\Application->getPluginCommands() at phar:///usr/bin/composer/src/Composer/Console/Application.php:156
 Composer\Console\Application->doRun() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:117
 Symfony\Component\Console\Application->run() at phar:///usr/bin/composer/src/Composer/Console/Application.php:104
 Composer\Console\Application->run() at phar:///usr/bin/composer/bin/composer:61
 require() at /usr/bin/composer:24

ERROR: Job failed: exit code 1
diamondlee

diamondlee commented on Dec 20, 2019

@diamondlee

@nicolas-grekas and @hal869 and @gundamftw maybe using the PHP constant instead of the trying to use the constants value will keep the code compatible between php versions

nicolas-grekas

nicolas-grekas commented on Dec 20, 2019

@nicolas-grekas
Member

I don't understand what this discussion is about anymore: the code doesn't use the constant anymore. About multiplex being the new default, we still need to support older releases so we can't do anything for the next few years.

If I miss something and you know what should be changed, please send a PR.

diamondlee

diamondlee commented on Dec 20, 2019

@diamondlee

@nicolas-grekas this conversation is about the fact that the symfony flex code throws an exception with php 7.4.

nicolas-grekas

nicolas-grekas commented on Dec 20, 2019

@nicolas-grekas
Member

CURLPIPE_HTTP1 doesn't exist in the code anymore. If you have the issue, the only reason I can imagine is because you didn't update flex to the latest version.

diamondlee

diamondlee commented on Dec 20, 2019

@diamondlee

@nicolas-grekas this seems to be resolved with the use of php 7.4.1 which was released 2019/18/12

TimoBakx

TimoBakx commented on Jan 20, 2020

@TimoBakx
Member

I had this issue in a project that I haven't touched in a while.

I fixed it by:

  1. Updating the global symfony/flex using composer global require symfony/flex ^1.5 as @nicolas-grekas suggested.
  2. Removing the vendor/symfony/flex directory in my project.
  3. Running composer update.
carherco

carherco commented on Jan 21, 2020

@carherco

I had this issue in a project that I haven't touched in a while.

I fixed it by:

  1. Updating the global symfony/flex using composer global require symfony/flex ^1.5 as @nicolas-grekas suggested.
  2. Removing the vendor/symfony/flex directory in my project.
  3. Running composer update.

That worked for me. Thanks!

mnapoli

mnapoli commented on Mar 11, 2020

@mnapoli

Same issue today as well, couldn't run any composer command in my project.

If you have the issue, the only reason I can imagine is because you didn't update flex to the latest version.

Sure, but how do you updated it? I haven't installed flex globally. And I can't update anything since Composer is broken.

Thanks @TimoBakx for the solution, I had to rm -rf vendor to unblock my project…

guilliamxavier

guilliamxavier commented on Oct 20, 2020

@guilliamxavier

Same issue today as well, couldn't run any composer command in my project.

If you have the issue, the only reason I can imagine is because you didn't update flex to the latest version.

Sure, but how do you updated it? I haven't installed flex globally. And I can't update anything since Composer is broken.

Thanks @TimoBakx for the solution, I had to rm -rf vendor to unblock my project…

FTR: you can also try composer update symfony/flex --no-plugins --no-scripts, then you should be able to run composer install (or other commands) normally

khaledalam

khaledalam commented on Apr 22, 2021

@khaledalam

you may have forgotten to upgrade your global flex install
compose global require symfony/flex ^1.5
BTW, don't hesitate to submit fixes next time, no need to wait when you can contribute them.

composer*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @fabpot@nicolas-grekas@ddegasperi@mnapoli@TimoBakx

        Issue actions

          composer fails in SF 4.2: " curl_multi_setopt(): CURLPIPE_HTTP1 is no longer supported " · Issue #515 · symfony/flex