composer require does not update composer.json code example Example 1: composer clear cache $ composer clearcache Example 2: composer update php composer.phar update