Framework: Laravel chooses not to use php7 mentioned in path and uses php5.6 and shows error with laravel new

Created on 30 Jul 2017  路  2Comments  路  Source: laravel/framework

  • Laravel Version: 5
  • PHP Version: 7.1 and 5.6

Description:

I have installed php7.1 and added it to my path variable in mac os Sierra after realising that laravel new command fails with php5.6

But even though which php shows the correct php7 folder and php-v also shows 7.1, laravel new still produces the same error and I have to go into the folder and remove the composer.lock file and run composer install and generate keys

Errors:

Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for doctrine/inflector v1.2.0 -> satisfiable by doctrine/inflector[v1.2.0].
- doctrine/inflector v1.2.0 requires php ^7.0 -> your PHP version (5.6.28) does not satisfy that requirement.
Problem 2
- doctrine/inflector v1.2.0 requires php ^7.0 -> your PHP version (5.6.28) does not satisfy that requirement.
- laravel/framework v5.4.30 requires doctrine/inflector ~1.0 -> satisfiable by doctrine/inflector[v1.2.0].
- Installation request for laravel/framework v5.4.30 -> satisfiable by laravel/framework[v5.4.30].

Most helpful comment

Hi there,

Unfortunately this is not a support area for application issues. This is only for issues/bugs with the framework code itself.

Please close your issue ticket here.

You can instead ask your question on one of the many great support areas:

  • Laravel Slack (https://larachat.co/)
  • Laravel.io Forum (https://laravel.io/forum)
  • Laracasts Forum (https://laracasts.com/discuss)
  • StackOverflow (http://stackoverflow.com/questions/tagged/laravel)

Thanks in advance.

All 2 comments

it's not a bug, it's the normal behaviour.
the composer.lock has been generated on php 5.6.
Just use composer global update.

Hi there,

Unfortunately this is not a support area for application issues. This is only for issues/bugs with the framework code itself.

Please close your issue ticket here.

You can instead ask your question on one of the many great support areas:

  • Laravel Slack (https://larachat.co/)
  • Laravel.io Forum (https://laravel.io/forum)
  • Laracasts Forum (https://laracasts.com/discuss)
  • StackOverflow (http://stackoverflow.com/questions/tagged/laravel)

Thanks in advance.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

felixsanz picture felixsanz  路  3Comments

gabriellimo picture gabriellimo  路  3Comments

kerbylav picture kerbylav  路  3Comments

RomainSauvaire picture RomainSauvaire  路  3Comments

lzp819739483 picture lzp819739483  路  3Comments