The PHPC types varies with the PHP version (example in MongoDB\Manager::executeBulkWrite()). This have an impact on the static analysis tools: psalm errors are different on PHP 7.4 and PHP 8.2
Benefits:
- Use more detailed types for better static analysis
- Allows to fix errors and update psalm-baseline using PHP 8+ (installing PHP 7.4 + compiling ext-mongodb on Mac M1 is not straightforward.
In GitHub, jobs blocking for merging will have to be updated.
The job can run on ubuntu 20.04 or be updated to 22.04, both support PHP 8.1.
https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#php-tools