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

Cant update #406

Closed
kironet opened this issue Aug 5, 2018 · 9 comments
Closed

Cant update #406

kironet opened this issue Aug 5, 2018 · 9 comments

Comments

@kironet
Copy link

kironet commented Aug 5, 2018

Hi,

I'm trying to update(composer update) my project, but I'm getting this error:

 [ErrorException]                                                             
  Declaration of Symfony\Flex\ParallelDownloader::getRemoteContents($originUr  
  l, $fileUrl, $context) should be compatible with Composer\Util\RemoteFilesy  
  stem::getRemoteContents($originUrl, $fileUrl, $context, ?array &$responseHe  
  aders = NULL)
@xabbuh
Copy link
Member

xabbuh commented Aug 5, 2018

Looks like you need to update Flex first: composer update symfony/flex --no-plugins

@DanielBadura
Copy link

When i try this: composer update symfony/flex --no-plugins before installing my dependencies then i get this error:

composer update symfony/flex --no-plugins
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 3 installs, 63 updates, 0 removals
 - Updating symfony/flex (v1.0.80 => v1.0.89)

...

Writing lock file
Generating autoload files
> symfony-cmd
sh: 1: symfony-cmd: not found
Script symfony-cmd handling the auto-scripts event returned with error code 127
Script @auto-scripts was called via post-update-cmd
The command "composer update symfony/flex --no-plugins" failed and exited with 127 during .
Your build has been stopped.

@B-Galati
Copy link

B-Galati commented Aug 7, 2018

You can try composer update symfony/flex --no-plugins --no-scripts.
Then try composer install.

Can you show us the scripts part of your composer.json?

@DanielBadura
Copy link

Why did i not try this myself before..
It worked with --no-scripts thanks!

@emxjay
Copy link

emxjay commented Aug 20, 2018

@B-Galati Marvelous! Thanks.

@WillGibson
Copy link

WillGibson commented Nov 6, 2019

While resurrecting my PHP playground after nearly 18 months in Node/TypeScript land, I had to resort to 2GB to get past this...

php -d memory_limit=2G /usr/local/bin/composer update symfony/flex --no-plugins --no-scripts

That's a lot of memory for a composer update!

@nicolas-grekas
Copy link
Member

But you disabled plugins, so don't expect flex to be involved in any way!

@WillGibson
Copy link

I concur, but I closed my terminal now so can't double check history easily. I think there were two things in play, the incompatible signature thing and a memory limit thing. I may have lost track of exactly which it was in the end due to going to the bar in our hotel for a while :-)

@WillGibson
Copy link

In the end I only needed to increase the PHP memory limit in my PHP container to 256GB to get composer install to behave. It took a while to work through a load of other things that seemed to be feeding into the general malaise, but that's my fault for leaving a PR on a personal project to go stale for about 18 months because I was working in a great place and got all my code fun at work :-)

tgalopin pushed a commit to tgalopin/flex that referenced this issue Dec 3, 2020
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

7 participants