MathieuM you can manually use PHP 7.1 (or any other installed version) by calling the binary directly.
For example instead of php flarum cache:clear
this will be /usr/bin/php7.1 flarum cache:clear
.
The binaries might be installed at another path depending on your operating system. Depending on your setup you should be able to call the binary without the path, like php7.1 flarum cache:clear
.
Same for running Composer. You can run /path/to/php composer.phar install
(if you downloaded the .phar) or /path/to/php /path/to/composer install
if you installed Composer globally. On my machine it would be /usr/bin/php7.1 /usr/local/bin/composer
but again this will depend on your setup.
There's also a way to switch which version is used when you call php
without a version but I've never done it. Google will probably give the answer to that.
Hope this helps 😉