Configuration according to this
http://confluence.jetbrains.c...
When using the old version of Phpstrom, when using laravel5.2, it is correct and easy to use.
When I changed to phpstrom2016.2 laravel5.3, an error was reported during configuration. Anyone know the reason?
The question link on stackoverflow.com is:
http://stackoverflow.com/ques...
Error message:
Thanks for the invitation. But I have never used PHPStorm, it is too expensive and I can’t afford it...
Looking at your error log, it should not be a problem with PHPStorm. You executed it
php artisan list --xml
这个命令,而--xml
是不被支持的,应该是php artisan list --format=xml
Maybe this parameter was not written by you. Looking at your screenshot, where Symfony is selected, it should be automatically called by PHPStorm
--xml
.I searched and found that many people have encountered this problem. The most commonly used solution is to modify the artisan problem to support the
--xml
参数。编辑项目根目录下的artisan
文件,在<?php
parameter. Edit theartisan
file in the project root directory and add a piece of code after<?php
:Source:
https://laracasts.com/discuss...
http://stackoverflow.com/a/34...
Some people in the PHPStore forum also gave other solutions, you can refer to https://youtrack.jetbrains.co...
--- update:
I just installed PHPStorm and tried it, and it works normally.
The version I installed:
Add command step:
Enter Settings Preferences | Tools | Command Line Tool Support
Click + to add a command. Select Tool based on Symfony Console and click OK
Enter the command code name, select Symfony version 3.*.*, select the php path, and enter the artisan file path of the project. Then click OK and a pop-up message will appear indicating that 59 commands have been found.
Test: Select the menu Tools | Run Command and enter
artisan
,artisan list
,artisan make:controller TestController
, both are normal.Notes:
When creating a new command, select the Symfony 3 version
Path to PHP executable To select the php location being used on your system, you can use
which php
in the system terminal to get it.which php
得到。PHPStorm 这里的选择框应该会把你系统使用的所有 PHP 版本列出来。我这边是两个,第一个
php
是 macoOS 自带的,版本是 5.5.36,而 Laravel 5.3 最低要求 PHP 版本是 5.6.4 。 你截图的那个错误就是这个原因,Laravel 5.3helpers.php
PHPStorm The selection box here should list all PHP versions used on your system. I have two here. The firstphp
comes with macoOS and its version is 5.5.36. The minimum required PHP version of Laravel 5.3 is 5.6.4. This is the reason for the error in your screenshot. There is a syntax in Laravel 5.3helpers.php
that PHP 5.5 does not support.