Closed
Description
Hi!
I'm not sure there is anything we can do about it, but due to the new 5.x on https://flex.symfony.com/versions.json, Flex is broken (no update or require options can be made) on versions 1.5.2 and lower. The fix is #580
On 1.5.2 or lower, depending on the exact command you're running and the exact version of Flex, you will probably get:
Uncaught Error: Call to a member function getVersions() on null in /Users/koff.pro/Downloads/code-messenger/start/vendor/symfony/flex/src/Cache.php
Or
Invalid version string "5.x"
The FIX
The fix is to upgrade symfony/flex with some flags to avoid it doing its normal job (which causes the error):
composer update symfony/flex --no-plugins --no-scripts
# or, if you have memory errors
COMPOSER_MEMORY_LIMIT=-1 composer update symfony/flex --no-plugins --no-scripts
Activity
stof commentedon Oct 8, 2020
if you run with
--no-plugins
, I don't even think you need to first remove thevendor
foldernicolas-grekas commentedon Oct 8, 2020
This is similar to #683
The fix has been released a few weeks ago already.
We cannot do better (but document of course, as done in this issue)
m-vo commentedon Oct 13, 2020
Just leaving this here in case someone stumbles over it: I had an installation with
symfony/flex
being installed globally. This then also broke creating projects withsymfony new
. Removing the global package resolves this of course but it might be not obvious what is causing the trouble.Merge pull request symfony#691