platform-check.php fails the deploy rather than the request

An application resolved against PHP 7.4 and deployed to a 7.3 server used to fail at some arbitrary point inside a library, with an error nobody connects to the runtime version.

// vendor/composer/platform_check.php — generated by Composer 2
$issues = array();

if (!(PHP_VERSION_ID >= 70400)) {
    $issues[] = 'Your Composer dependencies require PHP ">= 7.4.0".';
}

if ($issues) {
    // fatal, at the top of the autoloader
}

// composer config platform-check false   — to turn it off

The check runs before anything else, so a mismatched runtime is a clear message rather than an obscure failure four layers down. It reads the platform config, which means a project that sets it to production’s version gets a check for that version — and a developer machine running something newer will now fail loudly, which is the point and is initially annoying. Turning it off is available and is almost always the wrong response.