update php composer usees old version code example
Example 1: upgrade composer version
composer self-update
Example 2: composer takes older version of php
composer install --ignore-platform-reqs
composer self-update
composer install --ignore-platform-reqs