Reputation:
Lately l've been working with Laravel. I use composer to install packages and artisan for commands.
The problem is that my machine uses Laravel 5.4 not 5.7.
When i run phpinfo() the result is PHP Version 7.2.7. Do you think that the problem is that i don't use the latest version of xampp which it has included php 7?
Upvotes: 0
Views: 1258
Reputation: 11
If you using package laravel/installer
Update this package
composer global update
and try to run
laravel new my-app
Upvotes: 0
Reputation: 12233
Based on comment, yes it is related to PHP version. Your PHP CLI version is too low to support newer version of laravel. You need to update or switch PHP CLI to newer version. Server and CLI PHP are separate packages and might have different versions.
No it is not related to PHP version (in this case).
Probably you ran
composer install
which will install dependencies in versions defined in composer.lock
to update dependencies run
composer update
For differences between install
and update
you can refer to this question
Upvotes: 3
Reputation: 180004
From the comments:
laravel/framework v5.5.9 requires php >=7.0 -> your PHP version (5.6.19) does not satisfy that requirement.
Run php -i
in the Terminal. Looks like your webserver and your command line (which Composer uses) are using different versions of PHP.
Upvotes: 1
Reputation: 2416
Laravel version depends on your installation way. It's not related to your PHP or XAMPP version. And you are using the latest PHP version, so don't worry about PHP version.
Read the Laravel installation to install the latest version of laravel.
Upvotes: 0