If you see an error such as:
Composer detected issues in your platform:
Your Composer dependencies require a PHP version >= 8.2.0
it means the PHP version currently being used by Composer is lower than PHP 8.2, while your application's dependencies require PHP 8.2 or higher.
Steps to Fix
1. Check Your PHP Version
In cPanel, go to:
Software → Select PHP Version
Check the PHP version assigned to your domain.
Make sure it meets the version required by your application.
2. Change the PHP Version
If your domain is using an older PHP version:
-
Go to cPanel → Select PHP Version
-
Select your domain.
-
Choose PHP 8.2 or a compatible newer version.
-
Apply the change.
The required PHP version depends on your application's Composer dependencies.
3. Check the PHP Version Used by Composer
Changing the PHP version for the domain does not always mean that the Terminal/CLI Composer command is using the same PHP version.
Open cPanel → Terminal and run:
php -v
Then check:
composer --version
If php -v shows a version lower than 8.2, Composer will continue to report the platform requirement error.
4. Run Composer Again
After confirming that the correct PHP version is being used, run your Composer command again, for example:
composer install
or:
composer update
Use the command appropriate for your application's deployment.
Important
Do not use:
composer install --ignore-platform-reqs
as a permanent solution. This bypasses Composer's PHP compatibility check and may install dependencies that cannot run correctly on the server.
If PHP 8.2 or a newer compatible version is not available for your hosting account, please contact support to confirm the available PHP versions or hosting requirements.