When platform is specified in composer.json, this should be used for switch-php (possibly abbreviated to minor level). This should work analog to nvm by not specifying any further arguments.
composer.json
nvm