composer update package with dependencies code example Example 1: composer clear cache $ composer clearcache Example 2: composer update php composer.phar update