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

ryand's avatar
Level 6

Homestead and New Laravel Project: Is it PHP 7.0 or PHP 5.5.34?

I know I'm missing something here. I'm trying to hack around with Laravel 5.3 in a new project. I've reinstalled Homestead (and Virtual box and Vagrant) because the docs say it ships with PHP 7.0.

So I run the following for the new Laravel 5.3 project install:

composer create-project laravel/laravel new-project-install dev-develop

And get:

[InvalidArgumentException] Could not find package laravel/laravel with version dev-develop in a version installable using your PHP version 5.5.34.

The Homestead composer.json file says we're good to go on anything ">=5.5.9" and Laravel 5.3 looks like it currently requires ">=5.6.4".

I assume when the Laravel installer does it's thing, it's considering these minimum requirements in its setup. What am I blanking on?

0 likes
7 replies
ryand's avatar
Level 6

Sure. I guess what I'm getting at is I can't figure out how to get PHP to anything other than, apparently, 5.5.34 even when I wipe my system and start with fresh installs of everything and think I'm getting 7.0 because I'm following the Homestead install documentation.

I'm afraid it's some silly little oversight I'm making. Thanks for the response, @jlrdw!

willvincent's avatar

Just to clarify.. are you running the composer command inside the VM?

1 like
ryand's avatar
Level 6

Thanks, @willvincent ... I appreciate it. I'm going back through Jeffrey's videos now -- the ones I followed along with when I was even more of a rookie just trying to get set up:

https://laracasts.com/lessons/say-hello-to-laravel-homestead-two https://laracasts.com/series/laravel-5-fundamentals/episodes/1 https://laracasts.com/series/laravel-5-fundamentals/episodes/2

I know his workflow (and mine, usually) don't require installing projects from within the VM. And this is because most of the time we don't call on composer for the install -- as you pointed out being the difference and issue here -- but instead used the Laravel installer.

If it's simply that the global composer (local machine) call outside of the VM is always going to reference the local PHP version, I'd just have to update the local version of PHP to avoid the problem, correct?

Just wanting to make sure I really know what's going on this time around.

willvincent's avatar
Level 54

If it's simply that the global composer (local machine) call outside of the VM is always going to reference the local PHP version, I'd just have to update the local version of PHP to avoid the problem, correct?

Correct. Whatever environment you run the command on, dictates the version of php that's used. This is why, when using a VM I encourage people to run all of their commands inside the VM.

Please or to participate in this conversation.