Excluding Files from Project

Vu Nam Hung
Jul 20, 2017 · 2 min read

Basics

Sometimes you might need to exclude a single file from your project, so that it will be ignored by inspections, code completion, etc. This is done using the Mark as plain text action.

When a file is marked as plain text, PhpStorm does not use it anymore for code completion and navigation. Such file is shown as plain text in the editor, and is denoted with a special icon

in the Project tool window.

The reverse action is also available: you can return a file to its original type, using the Mark as <file type> action.

In the context of a PHP project, you can also exclude entire PHP archives (.phar files) to prevent multiple declaration conflicts between classes in a .phar archive and the corresponding classes in the installed vendors directory.

Marking a file as plain text


To mark a file as plain text, follow these steps

  1. In the Project tool window, select the desired file.

Marking a file with its regular type


To mark a file with its regular type, follow these steps

  1. In the Project tool window, select the desired file, marked with
  1. icon.

Excluding a .phar archive from a project


To exclude a .phar archive from a project

  • In the Project tool window, select the required .phar archive and choose Exclude phar from project on the context menu of the selection.

Vu Nam Hung

Ghi chép linh tinh

)
Vu Nam Hung

Written by

Coder, *nixer, Music lover

Vu Nam Hung

Ghi chép linh tinh

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade