We cannot really switch phan job to PHP 7.4: phan uses the PHP version it's executed on in two ways:
- To infer accurate signatures via Reflection (not sure how much this would affect us)
- To determine the minimum PHP version supported by the codebase.
2 is what's causing the failure there: if we run phan with 7.4, it thinks that 7.4 is the minimum supported version, and suggests fixes that are only available in 7.4+. This behaviour can be changed, of course. In fact, the minimum supported version is determined by the first available value in the following list:
minimum_target_php_version phan option -> composer requirement for php -> target_php_version phan option -> PHP version used to run phan
So we'd need to specify one (or more) of the first three.