PHPStorm 3.0 发布,PHP 集成开发工具

PhpStorm 是 JetBrains 公司开发的一款商业的 PHP 集成开发工具。

[目录]

PhpStorm 3.0
给我们带来了很多新功能和修复,一共有700改动让这个IDE变得更加易用,更加智能。

  1. Prerequisites plugin installation and
    configuration

    1. 1 Ensure Composer is
      initialized
    2. 2 Install the Laravel IDE
      Helper
    3. 3 Generate the PHPDoc Helper File using
      Artisan
    4. 4 Install and enable the Laravel
      Plugin
  2. Laravel Framework Support in
    PhpStorm

    1. Code Completion and Navigation for Controllers and
      Routes
    2. Code Completion and Navigation for
      Views
    3. Code Completion and Navigation for Configuration and
      Services
    4. Code Completion and Navigation for
      Translations
    5. Automatic PSR-4
      Namespacing
  3. Blade Template Support in
    PhpStorm

    1. Code Completion for Braces and
      Directives
    2. Sections
      Support
    3. Code Completion and Navigation for Extends and
      Includes
  4. Generating Code with Live
    Templates
  5. Command Line Tool Support for Artisan and
    Composer
  6. Debugging Laravel Applications with
    PhpStorm
  7. Laravel Unit Testing with
    PhpStorm
  8. Database Support in
    PhpStorm

PHP UML

澳门新葡亰8455下载app 1

 

Profiler

澳门新葡亰8455下载app 2

Laravel is a free, open source
PHP web application framework. It is
built on top of severalSymfony components,
and provides a development framework that makes common tasks such as
authentication, routing, sessions and caching much easier to implement.

New PHP formatting options

支持Zend,Pear和其他标准的PhpDoc格式化。

In this tutorial, we’ll see how we can develop Laravel applications
using PhpStorm taking advantage of the Laravel plugin for
PhpStorm and the Laravel IDE
helper. Make sure to
explore the generic PhpStorm
tutorials
and Laracast’s PhpStorm
tutorials
to learn more about Laravel and PHP development using PhpStorm.

VCS News

澳门新葡亰8455下载app 3

 

Platform Improvements

支持MAC OS X LION

Prerequisites (plugin installation and configuration)

PhpStorm comes with code completion, navigation, automatic inspections,
refactoring, … for
PHP. It
also provides support for Laravel’s template engine,
Blade. Using the Laravel
plugin and the Laravel IDE
helper, we can extend
PhpStorm’s support for Laravel applications. Let’s install them into our
project.

There’s a bit of setup work initially, but this is only needed once. It
will make sure we get full Laravel support in PhpStorm, including code
completion, navigation, Composer support, Artisan command-line support
and additional Blade syntax support.

Smart Duplicated Code Detector

澳门新葡亰8455下载app 4

+

1. Ensure Composer is initialized

One thing we want to make sure beforehand is that
Composer is initialized and configured in
PhpStorm.
After opening a Laravel project, select the root node in the project
tool window and use the Composer | Init composer… context menu.
PhpStorm can download composer.phar if needed.

澳门新葡亰8455下载app 5

PHP Debugger Improvements

澳门新葡亰8455下载app 6

2. Install the Laravel IDE Helper

Once Composer is available for use in our project, we can install the
Laravel IDE helper
into our project. We can use theComposer | Add dependency…
context menu and search for barryvdh/laravel-ide-helper. Click
Install to download the package and add it to our project.

澳门新葡亰8455下载app 7

Once installed, we have to add the Laravel IDE helper as a
ServiceProvider into our application. In the app/config/app.phpfile,
add 'BarryvdhLaravelIdeHelperIdeHelperServiceProvider' under the
providers element:

<?php
return array(
    // ...

    'providers' => array(
        // ...

        'BarryvdhLaravelIdeHelperIdeHelperServiceProvider', // Laravel IDE helper

    ),

    // ...
);

Laracasts also has a video tutorial available
on enabling PhpStorm support for Laravel
Facades
using the Laravel IDE Helper.

PHPUnit Testing Improvements

  • Fast switch between test/source is now available
  • Test generation improved
  • PHPUnit 3.6 support
  • Diff view of actual and expected values
  • Full support of all command line test runner options
3. Generate the PHPDoc Helper File using Artisan

After installing the Laravel IDE Helper, we can use artisan to
generate a PHPDoc helper file that PhpStorm and the Laravel plugin will
use to provide code completion and navigation.

The easiest way to do this is by enabling command line tool support for
artisan.
From the settings, add a new command line tool under Tools | Command
Line Tool Support
. The tool type is a Tool based on Symfony
Console
. Next, provide the path to artisan:

澳门新葡亰8455下载app 8

Once saved, we can use artisan from within the IDE. The Tools | Run
Command…
menu (Ctrl+Shift+X or CMD+Shift+Xon Mac OS X)
provides completion for all artisan commands that are available. Run the
artisan ide-helper:generate command to generate the required PHPDoc
information.

澳门新葡亰8455下载app 9

The Laravel IDE Helper may have to be run after changing or adding
services, controllers, models and views. TheLaravel IDE Helper GitHub
page
provides additional tips on running it, for example, after performing an
install or update of Composer dependencies.

Another options is using File Watchers in
PhpStorm
to automatically regenerate this file when, for example,composer.json
is updated.

JavaScript Enhanced

支持CoffeeScript和JavaScript单元测试

4. Install and enable the Laravel Plugin

Under Settings (Preferences) | Plugins, click the Browse
repositories…
button and search for Laravel. Next, we can use the
Install plugin button or the context menu to proceed with plugin
installation.

澳门新葡亰8455下载app 10

Restart the IDE to complete the installation of the plugins. Next, we
will have to enable the Laravel Plugin in our project. We can do this
from Settings (Preferences) | Other Settings | Laravel Plugin |
Enable Plugin for this Project
. We’ll have to restart the IDE once
more to load the plugin’s additional features for Laravel.

澳门新葡亰8455下载app 11

In case of any problems with the completion and navigation support
provided by this plugins, select File | Invalidate Caches / Restart to
reindex your project. Running artisan clear-compiled and
artisan ide-helper:generate may also be required.

FTP/SFTP Sync Improved

FTP同步

Laravel Framework Support in PhpStorm

Let’s explore the Laravel plugin’s features for working in PHP code.

XSLT

XSLT 2.0 和 XSLT Debugger 支持。

澳门新葡亰8455下载app 12

(文/开源中国)    

Code Completion and Navigation for Controllers and Routes

When referencing a controller, we can use code completion by pressing
Ctrl+Space (CMD+Space on Mac OS X) and select the controller
from the list that pops up. This works when using the Redirect and
Route澳门新葡亰8455下载app, facade’s various functions:

澳门新葡亰8455下载app 13
澳门新葡亰8455下载app 14

We can also navigate to the controller using Ctrl+Click
(CMD+Click on Mac OS X) or Go To
Declaration
(Ctrl+B /CMD+B). Simply hovering the mouse with
the Ctrl or CMD key pressed will show additional details.

澳门新葡亰8455下载app 15

网站地图xml地图