r-darwish / topgrade

Upgrade everything
GNU General Public License v3.0
3.36k stars 160 forks source link

Update composer itself #871

Closed openjck closed 2 years ago

openjck commented 2 years ago

Composer ships with a command for updating itself. Considering that manual installation of Composer is recommended on Ubuntu, I think that automatically updating Composer with topgrade would be a good idea.

I want to suggest a new step

Which tool is this about? Where is its repository?

composer

https://github.com/composer/composer

Which operating systems are supported by this tool?

*nix, macOS, Windows

What should Topgrade do to figure out if the tool needs to be invoked?

I'm afraid I'm not sure. It seems that running composer self-update is safe when Composer is already updated to the latest version, however.

Which exact commands should Topgrade run?

composer self-update

More information

Assuming that someone else implements the feature, please state if you know how to test it from a side branch of Topgrade.

Yes, I can help test this change.

r-darwish commented 2 years ago

You can set

[composer]
self_update = true

In your configuration, which will cause Topgrade to do that.