PhpStorm+Laravel_5.1开发环境搭建

参数文档:Laravel Development using PhpStorm

  1. 在PhpStorm + Laravel5.1下无法为artisan创建【command line tool support】问题

现象

1
2
3
4
5
6
7
8
Problem
Failed to parse output as xml: Error on line 4: Content is not allowed in prolog..
Command
php.exe C:\Users\Maxim.Kolmakov\PhpstormProjects\Laravel-5\artisan list --xml
Output
[ErrorException]
The --xml option was deprecated in version 2.7 and will be removed in versi
on 3.0. Use the --format option instead.

原因
Laravel 5.1版的Artisan的命令行的xml标志位已经被删除,详见Symfony的Git提交记录

解决办法:2种

  • 将Laravel降级为5.0版本
  • 到目录[项目根目录]/vendor/symfony/console/Command下将如下两个文件还原回去:
    1
    2
    HelpCommand.php
    ListCommand.php

2.phpstorm laravel live template

转载请注明出处:cloudnoter.com