composer set php version code example
Example 1: check composer php version
composer -vvv about
Example 2: composer require with version
composer require vendor/package:version
composer require refinery29/test-util:0.10.2
Example 3: update composer php version
php7.3 -f /usr/local/bin/composer update
Example 4: composer takes older version of php
composer install --ignore-platform-reqs