Symfony 4 : composer.lock PHP version

  php, symfony

My previous post was :

I realized a project for my internship using Symfony 4.

I decided to go to OVH to host it for my internship supervisor, however once my project is uploaded, I >get this error message:

Fatal Error: composer.lock was created for PHP version 7.4 or higher but the current PHP version is >7.3.17.

Knowing that the PHP version of OVH at the far end is 7.3, does anyone have a solution to help me?

My post was close, I was suggested to go see this post, I tried to make the answers that were given however my problem was not resolved, I still have the same problem, if someone has a solution …

I already have it in my composer.json

    "require": {
    "php": "^7.2.5",

I have try to make an composer update, it doesn’t work.

I try do delete my composer.lock and then reinstall with composer install, it doesn’t work.

Source: Symfony Questions

2 thoughts on - Symfony 4 : composer.lock PHP version

  • I’m facing right now exactly the same problem. It’s impossible to unblock Symfony from requiring that 7.4 that is NOT stated in composer at any place. I can’t find a fix for this blocking issue.