The fix is to use the action `shivammathur/setup-php@v2` to setup the proper PHP version in the test runner, replacing `php-actions/composer` which only ensured using the desired PHP version while installing the project dependencies.
This allows to reuse the workflow syntax for a job, tweaking small parts via configuration.