At the moment, I’m facing this issue. I’ve tried everything: deleting composer.lock, then updating composer.json, tried to update PHP version to the highest version, still the same. When I check PHP version in CMD, it shows that my version is 7.4.10, but when I try to open "public" folder on localhost, it shows this "Fatal error: composer.lock was created for PHP version 7.4 or higher but the current PHP version is 7.1.33.".
Thanks in advance
Source: Symfony Questions