Best practice for updating the framework

What is the best practice to update the framework files?

  1. Should I replace the whole vendor folder?


  1. Only replace the vendor/yiisoft folder?


  1. I should replace the vendor/yiisoft/yii2 folder?

Also, is there any way to update the framework files (with GitHub) direct using git command?


The best way is to use Composer.

Thanks for your hints.

I was confused about what command to give, as I have used composer in only 1 or 2 project.

I found the exact command. It works for me.

C:/xampp/php/php.exe C:/ProgramData/ComposerSetup/bin/composer.phar update