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

New 5.x version breaks Flex versions 1.5.2 and lower #691

Closed
weaverryan opened this issue Oct 8, 2020 · 3 comments
Closed

New 5.x version breaks Flex versions 1.5.2 and lower #691

weaverryan opened this issue Oct 8, 2020 · 3 comments

Comments

@weaverryan
Copy link
Member

weaverryan commented Oct 8, 2020

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
@stof
Copy link
Member

stof commented Oct 8, 2020

if you run with --no-plugins, I don't even think you need to first remove the vendor folder

@nicolas-grekas
Copy link
Member

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
Copy link

m-vo commented 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 with symfony new. Removing the global package resolves this of course but it might be not obvious what is causing the trouble.

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

4 participants