0

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?

4 Answers4

3

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

mleko
  • 11,650
  • 6
  • 50
  • 71
  • - laravel/framework v5.5.9 requires php >=7.0 -> your PHP version (5.6.19) does not satisfy that requirement. This i the error i received when i tried to update composer. –  Sep 19 '18 at 12:17
  • @AstritSpanca Then your PHP CLI is set to PHP 5.6. You need to upgrade your PHP CLI. (This isn't that unusual - they can be totally separate installs versus the webserver.) – ceejayoz Sep 19 '18 at 12:17
1

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.

ceejayoz
  • 176,543
  • 40
  • 303
  • 368
0

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.

Sand Of Vega
  • 2,297
  • 16
  • 29
0

If you using package laravel/installer

Update this package

composer global update

and try to run

laravel new my-app
Piotr
  • 11
  • 3