You may encounter the following error working with Laravel, or PHP applications in general: Composer detected issues in your platform: Your Composer dependencies require a PHP version “>=php version number

This guide provides a workaround on this issue.
Cause: #
Lower PHP version on your server.
Explanation. #
On our shared hosting servers, the servers are configured to work with a specific global PHP version.
This Global PHP version is used to run other services on the server.
This version is different from what you see on cPanel interface.
Your application may say composer requires php 8.3.
So you decide to change the version on cPanel but the changes are not effected.

The reason is that your composer checks PHP CLI which may still be lower as below.
The PHP CLI on a server below is 8.2

Resolution/Workaround. #
Unfortunately for our servers, we cannot just change the Global PHP cli version.
However the workaround below can assist to alleviate the error.
You can do this by disabling platform check on your composer.json
file for Laravel.
To disable platform check, you add this line to config
section of composer.json
file
"platform-check": false,
Then run these two commands:
composer dump-autoload
php artisan config:cache
Once done, you should be able to proceed with your Laravel Application setup without the issue.