Главная » Настройка PhpStorm для удобной работы с фреймворком Yii

Настройка PhpStorm для удобной работы с фреймворком Yii 

Тэги: ide, phpstorm, yii, программирование,

Описание настройки популярной IDE PhpStorm для удобной работы с фреймворком Yii.

Code completion

  1. Exclude yiilite.php from index:
    1. File → Settings → IDE Settings → File Types.
    2. yiilite.php to Ignore files and folders.
  2. Exclude not used directories, specify resources.
    1. File → Settings → Project settings → Directories.
    2. Mark framework/cli/views, protected/runtime and assets as excluded.
    3. Mark website root as resource root.
  3. Specify path to your PHP.
    1. File → Settings → Project settings → PHP → PHP Home.
  4. If your project uses common Yii framework folder you need to include it.
    1. File → Settings → Project settings → PHP → PHP Home → Add.
    2. Specify a path to framework directory.
  5. If you are writing unit tests you can include PHPUnit to get code completion:
    1. File → Settings → Project settings → PHP → PHP Home → Add.
    2. Specify a path to PHPUnit.

Testing 

You should install PHPUnit to run unit tests.

  1. PHPUnit.
    1. Follow official PHPUnit installation guide.
    2. In your IDE: Run → Edit configurations.
    3. Press "+".
    4. Name: anything.
    5. Test: depending on what do you want to test select an appropriate option. Specify path.
    6. Use XML configuration file: specifying path to phpunit.xml. Often it's path_to_your_webroot/protected/tests/phpunit.xml.
  2. To run tests use SHIFT+F10.
Bookmark and Share

Перейти на сайт

Просто совет
Два месяца бесплатного использования VPS-сервера с 20Гб SSD на борту. Интересует?
Тогда жми сюда.
Твиттер-лента
Follow TanitaCMS in Twitter