That happens when you have different PHP versions in local and production. E.g. you have PHP8 on your local machine and PHP7.4 in production. When you run composer update, the composer.lock file is created for PHP8. When you run composer install in production, you can't install the dependencies, because they were calculated for your dev machine.
If your server e.g. still runs PHP 7.3, you can run this in your project:
composer config platform.php 7.3.*
It add a section to the composer.json adjusting the dependencies to PHP 7.3. When you run composer update, the composer.lock file will now only get dependencies compatible with your server PHP.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
That happens when you have different PHP versions in local and production. E.g. you have PHP8 on your local machine and PHP7.4 in production. When you run
composer update
, the composer.lock file is created for PHP8. When you runcomposer install
in production, you can't install the dependencies, because they were calculated for your dev machine.If your server e.g. still runs PHP 7.3, you can run this in your project:
composer config platform.php 7.3.*
It add a section to the composer.json adjusting the dependencies to PHP 7.3. When you run
composer update
, the composer.lock file will now only get dependencies compatible with your server PHP.