Hi,
Looks like a breaking change was introduced a couple hours ago in composer (link), which gives the following error:
[ErrorException]
Declaration of Symfony\Flex\ParallelDownloader::getRemoteContents($originUrl, $fileUrl, $context) should be
compatible with Composer\Util\RemoteFilesystem::getRemoteContents($originUrl, $fileUrl, $context, ?array &
$responseHeaders = NULL)
Cheers
Correct, you need to upgrade Flex.
I don't think there is any other way around. You might need to run composer update --no-plugins to do so. If it doesn't work, you might need to downgrade to a stable version of Composer, do the update and upgrade again.
Duh. Somehow missed the Flex update. Sorry about that.
What about environments where composer is out of your control? For example, I'm getting my CircleCI builds failing because of this
The composer.lock is yours: you should ensure it references an updated flex version.
So, this is my current situation: build before running "composer update" was fine, build after is broken (with above error). Since I can't update composer inside build image, what can I do? I'd prefer to avoid to keep an old version of vendors
The issue is independent from Composer there is no need to update or downgrade it.
You need to update flex instead.
I don't know how you manage your dependencies, so I can't do much more.
composer update symfony/flex --no-plugins is the minimum command you should run.
I thought it was related to recently published composer 1.7, as I read in the aforementioned issue.
Anyway, I already updated all vendors and now I also tried your command for a specific update (but it was a "Nothing to install or update").
My current flex version is v1.0.89 with Symfony 4.1.3
Hi ! I've got exactly the same problem. I saw that composer had an upgrade the 2018-08-03, does anyone know how to downgrade it ? I think that this can solve the problem
I tried a build without cache and it works. So it looks like my issue was with CircleCi
try composer update symfony/flex
within CircleCI rebuild without cache
The problem is that i use composer in docker so i can't update symfony/flex because i've got no composer.json before i build the image.
docker-compose exec yourappname composer update symfony/flex
or if You build it manually in Dockerfile write line RUN composer update symfony/flex
Hi, I've got the same error in CircleCI only. I correct all by
I needed to clear Travis cache too.
Most helpful comment
The issue is independent from Composer there is no need to update or downgrade it.
You need to update flex instead.
I don't know how you manage your dependencies, so I can't do much more.
composer update symfony/flex --no-pluginsis the minimum command you should run.