blable
blable

Reputation: 11

symfony - composer too old

I have a problem while I tried to start symfony, the error is:

composer require server --dev
Some Symfony Flex features may not work as expected: your version of Composer is too old
Please upgrade using https://getcomposer.org/

I tried to update composer, but I can't find the way to do it, in composer documentation here I followed the steps but:

php -r "if (hash_file('SHA384', 'composer-setup.php') === '52cb7bbbaee720471e3b34c8ae6db53a38f0b759c06078a80080db739e4dcab6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
Installer corrupt

So, I'm in a loop of errors, what can I do?

(I'm working in ubuntu)

Of course I tried:

composer self-update


  [InvalidArgumentException]             
  Command "self-update" is not defined. 

Upvotes: 1

Views: 1333

Answers (1)

Alessandro Minoccheri
Alessandro Minoccheri

Reputation: 35973

The command self-update i only available when you install composer as a phar, not as a dependency in the global project or via apt.

So you need to uninstall composer and reinstall it with phar and after you can use self-update

Documentation

Upvotes: 1

Related Questions