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

Imcompatible declaration of Symfony\Flex\ParallelDownloader::getRemoteContents(...) #397

Closed
Aryess opened this issue Jul 27, 2018 · 15 comments

Comments

@Aryess
Copy link

Aryess commented Jul 27, 2018

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

@Aryess Aryess changed the title Declaration of Symfony\Flex\ParallelDownloader::getRemoteContents(...) should be compatible with Composer\Util\RemoteFilesystem::getRemoteContents(...) Imcompatible declaration of Symfony\Flex\ParallelDownloader::getRemoteContents(...) Jul 27, 2018
@nicolas-grekas
Copy link
Member

Correct, you need to upgrade Flex.

@fabpot fabpot closed this as completed Jul 27, 2018
@nicolas-grekas
Copy link
Member

nicolas-grekas commented Jul 27, 2018

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.

@Aryess
Copy link
Author

Aryess commented Jul 27, 2018

Duh. Somehow missed the Flex update. Sorry about that.

@garak
Copy link
Contributor

garak commented Aug 6, 2018

What about environments where composer is out of your control? For example, I'm getting my CircleCI builds failing because of this

@nicolas-grekas
Copy link
Member

The composer.lock is yours: you should ensure it references an updated flex version.

@garak
Copy link
Contributor

garak commented Aug 6, 2018

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

@nicolas-grekas
Copy link
Member

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.

@garak
Copy link
Contributor

garak commented Aug 6, 2018

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

@KilMer56
Copy link

KilMer56 commented Aug 6, 2018

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

@garak
Copy link
Contributor

garak commented Aug 6, 2018

I tried a build without cache and it works. So it looks like my issue was with CircleCi

@blazejkrzak
Copy link

blazejkrzak commented Aug 6, 2018

try composer update symfony/flex
within CircleCI rebuild without cache

@KilMer56
Copy link

KilMer56 commented Aug 6, 2018

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.

@blazejkrzak
Copy link

blazejkrzak commented Aug 6, 2018

docker-compose exec yourappname composer update symfony/flex

or if You build it manually in Dockerfile write line RUN composer update symfony/flex

@sdrean
Copy link

sdrean commented Aug 6, 2018

Hi, I've got the same error in CircleCI only. I correct all by

  • not using the restore_cache in the config.yml
  • using flex in 1.0.80.

@ArnaudBarre
Copy link

I needed to clear Travis cache too.

stephaneseng added a commit to stephaneseng/github-dashboard that referenced this issue Aug 19, 2018
jeroenvdheuvel pushed a commit to Werkspot/jira-custom-dashboard that referenced this issue Sep 6, 2018
Updating the package is necessary in order to be able to install them
via the latest version of composer (1.7.2). With the previously installed
package we got an "Imcompatible declaration" conflict between Symfony flex
and composer.

symfony/flex#397
jeroenvdheuvel pushed a commit to Werkspot/jira-custom-dashboard that referenced this issue Sep 6, 2018
Updating the package is necessary in order to be able to install them
via the latest version of composer (1.7.2). With the previously installed
package we got an "Imcompatible declaration" conflict between Symfony flex
and composer.

symfony/flex#397

As a bonus I tried to use as many stable packages as possible. The
default installed package is now also set to stable.
aurelijusb added a commit to aurelijusb/kickstart that referenced this issue Sep 21, 2018
humble-ahitofel added a commit to humble-ahitofel/kirjastohakemisto that referenced this issue Mar 4, 2019
'composer install' was not working because of this issue:
symfony/flex#397
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

8 participants