I have a project using symfony/flex in which I cannot run composer install
or composer update
. I also can't create a new composer project with symfony/flex as a dependency as the failure is the same. For example;
mkdir foo && cd foo && composer require symfony/flex -vvv
Always has the following output;
...
Package operations: 1 install, 0 updates, 0 removals
Installs: symfony/flex:v1.2.6
- Installing symfony/flex (v1.2.6): Reading /Users/me/.composer/cache/files/symfony/flex/17b622276922e6347ea129acd6238ae1c41d96b6.zip from cache
Loading from cache
Extracting archiveExecuting command (CWD): unzip -qq '/Users/me/projects/foo/vendor/symfony/flex/2064a553f7cdf064ba8c1b62c7087ec6' -d '/Users/me/projects/foo/vendor/composer/65215880'
Loading plugin Symfony\Flex\Flex
Downloading https://flex.symfony.com/versions.json
The download hangs for a few seconds at the point of downloading versions.json before silently failing. vendor/symfony/flex
exists.
What could be the cause of this failure? My colleague can run the same command successfully so I'm assuming an issue with my local composer. I have attempted reinstall composer and clearing the cache with no success.
Edit: now when running composer update -vvv
in an existing project I get the following output
...
Downloading https://repo.packagist.org/packages.json
Where it also hangs, so it looks like composer cannot download certain JSON files? Packages download fine so it doesn't look like a lack of internet.
Edit 2: I can also confirm using composer update --no-plugins
does work within the existing project.