Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Gavmrz's avatar

composer install with wrong php version

I am trying to set up all my existing laravel projects on a new mac. I usually run them all in homestead on a per project installation. I have php 8 installed on the mac. When I git clone a project and try and run composer install it fails because each project relies on a different php version e.g. 7.1, 7.3, 7.4 etc.. so it complains that I'm trying to run install on php 8.

I thought maybe I need to run vagrant up and then run composer install from within the vm...but because I can't run composer install, I can't yet run vagrant up. Surely there is a smooth workflow for this?

Thanks

0 likes
1 reply
vlaosm's avatar
vlaosm
Best Answer
Level 5

Try

composer install --ignore-platform-reqs

Please or to participate in this conversation.