Does it make any difference between updating by composer.phar self-update
and just replacing composer.phar with a newer version (e.g. with curl -sS https://getcomposer.org/installer | php
)?
I'm asking this since composer.phar self-update
makes some problems and I thougt then I will just download a new version. But I'm also wondering if it's just about replacing one single file, why is self-update
implemented as well? What is the benefit of using this routine?
The process is different, but the result is the same. Using the most recent composer phar file.
The benefits are in easier access. To update, I just type composer
like I always do when install/update/require new packages, then add self-update
.
Also when I forget the command, just run composer
and command list is printed.
One more reason is it's common command in PHAR file ecosystem. PHPUnit, PhpCsFixer and many other have the same command.