'Trying to deploy laravel 8.82 on digitalocean but composer error

i am trying to deploy a laravel project on my digitalocean server and below are the errors i am getting, tried everything i could but i keep getting this error

"Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2"."

PHP version i am running on the server is php 8.1.1 and the laravel project is 8.82

i tried --ignore-platform-reqs but then i get a 500 internal error afterwards

Please help.

Thank you



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source