Fix PHP 8 tests and add Composer 2 support in tests
This gets tests working on PHP 8 and PHP 8.1 by switching the test environment over to Composer 2.
- PHP 7.4 test was changed to use PHP 7.4.7 due to a compatibility issue with roave/dont, as it does not support Composer 2 on PHP versions 7.4.0-7.4.6. I wasn't sure if I should bump the minimum required version to 7.4.7 also, so I left it at 7.4.
- PHP 8.0.1 was used due to php-cs-fixer not supporting PHP 8.0.0
- The vimeo/psalm upgrade fixes the error seen in !2 (merged)