Laravel新并不在我的本地环境中工作

问题描述:

我试图创建一个新的laravel的应用程序,但是当我使用命令“laravel新的”我有一个错误:Laravel新并不在我的本地环境中工作

laravel new 
Crafting application... 
Loading composer repositories with package information 
Installing dependencies (including require-dev) from lock file 
Your requirements could not be resolved to an installable set of packages. 

    Problem 1 
    - Installation request for phpunit/php-token-stream 2.0.0 -> satisfiable by phpunit/php-token-stream[2.0.0]. 
    - phpunit/php-token-stream 2.0.0 requires php ^7.0 -> your PHP version (5.6.30) does not satisfy that requirement. Problem 2 
    - phpunit/php-token-stream 2.0.0 requires php ^7.0 -> your PHP version (5.6.30) does not satisfy that requirement. 
    - phpunit/php-code-coverage 4.0.8 requires phpunit/php-token-stream ^1.4.2 || ^2.0 -> satisfiable by phpunit/php-token-stream[2.0.0]. 
    - Installation request for phpunit/php-code-coverage 4.0.8 -> satisfiable by phpunit/php-code-coverage[4.0.8]. 

Application ready! Build something amazing. 

我在Windows 10上安装了php 5.6.30。

我已经尝试更新作曲家本身和laravel的安装程序(通过作曲家全局需求“laravel/installer”),但它仍然无法正常工作。

我上次在这台电脑上试过的时间是三个星期前,然后它就工作了。

编辑:我无法更改我的PHP版本,因为它是我在我的服务器上使用的版本。

+0

,你需要PHP 7.0或更高 – Jerodev

+0

像@Jerodev说,包中的一个需要PHP的错误状态或7.0更高 – DestinatioN

+0

我认为你应该更新你的PHP到7.0版本 – Abdessamad139

它看起来像你正试图下载laravel的最新发布。虽然是5.4,但出于某种原因,它是下载laravel的版本是只与PHP7composer create-project --prefer-dist laravel/laravel blog "5.4.*"尝试安装laravel 5.4

+0

感谢您的回答!它也没有告诉版本号。 –

这只是PHPUnit的版本兼容。版本更改为更小的,如:

"phpunit/phpunit": "~5.7"

"phpunit/phpunit": "~5.0"