2

I'm trying to update the global composer but I can't do it.

I think I can do composer init and then make php composer.phar update but I prefer to update the global composer. If I run the latter, I get:

composer could not find a composer.json file

How can I make it? I try to find the composer files of installation and I can't find them and also I try to find information using composer but nothing.

halfer
  • 19,824
  • 17
  • 99
  • 186
Lluís Puig Ferrer
  • 1,128
  • 7
  • 19
  • 49
  • `but I can't do it.` you forgot to write why. do you get an error? what's the problem? – Federkun Dec 29 '17 at 15:44
  • 3
    Update composer itself? `composer selfupdate`. Update the global composer packages? `composer global update` – Chris Forrence Dec 29 '17 at 15:46
  • Hello @ChrisForrence if I make `composer global update` I get `composer could not find a composer.json file`. – Lluís Puig Ferrer Dec 29 '17 at 15:54
  • Hello @Federkun the problem is like I say to Chris when I try to update the global composer with `composer global update` it's not working. It's true that composer.json file doesn't exit. When you make the `composer global update` the directory of composer change but without composer.json file. – Lluís Puig Ferrer Dec 29 '17 at 15:57
  • Does this answer your question? [How to downgrade or install a specific version of Composer?](https://stackoverflow.com/questions/64597051/how-to-downgrade-or-install-a-specific-version-of-composer) – yivi Apr 20 '22 at 07:56

0 Answers0