Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialElinor Armsby
13,987 PointsError installing laravel
Got this error: Cannot use laravel/laravel's latest version v6.0.0 as it requires php ^7.2 which is not satisfied by your platform.
I have PHP 8.2.12 on my localhost (xampp). How do I get past this issue?
1 Answer
Rachel Johnson
Treehouse TeacherHey Elinor Armsby , thanks for your post.
It looks like your Composer may be configured with the older version of PHP. You'll likely need to switch PHP versions used by Composer.
One method is to uninstall Composer and reinstall it. The new install, by default, should use the latest version of PHP on your machine or virtual environment (XAMPP).
There are methods to change the PHP version used by Composer as well, here are a few resources:
- https://benmarshall.me/how-to-change-composer-php-version/
- https://mikemadison.net/blog/2021/6/2/tutorial-updating-to-php-80-with-composer
- https://stackoverflow.com/questions/46986139/how-to-change-php-version-used-by-composer
Do note that these resources may be for Windows or Mac. So you may need to adjust commands a little depending on your operating system.
I hope this helps!