I've got a lot of research about it but I found nothing that can help my problem. I'm developing a project for now using laravel5.1
and I'm using PHP5.6
version, however I also want to install the new laravel version which is L5.5
but the minimum PHP requirement is PHP7.0
and I chose the 5.6
version of PHP in my installed composer
.
How can I switch this two versions of PHP without reinstalling the composer again and again? So if I work with Laravel5.1
I can use the composer with PHP5.6
, otherwise I use Laravel5.5
with PHP7
version.
Note:
I'm using WAMP Server that has PHP5.6
& PHP7
available to use.
Create a Windows batch file that calls the composer.phar file using the php7 binary. Let's call the file composer7.bat:
Save the file along with the originally installed composer.bat file, mine is located in C:\ProgramData\ComposerSetup\bin\ directory.
Now call the php7 composer with the new command: