PhpStorm
 
Get PhpStorm
You are viewing the documentation for an earlier version of PhpStorm.

Configuring folders within a content root

Last modified: 01 September 2023

Within a content root, PhpStorm can distinguish between the folders that contain source code, and the ones to be ignored while searching, parsing, watching and so on. To distinguish different types of folders, mark any folder below a content root as a source folder or as excluded.

Within a content root, PhpStorm can distinguish between Source folders, Resource Root folders, Test Source code, and Excluded folders.

The folder marked as Source is the root folder for all the PHP namespaces in the current project.

Files in the folder that is marked as resource root can be referenced relative to this folder. Excluded folders are not involved in indexing and therefore they are ignored while searching, parsing, watching, and other operations.

To invoke this distinction, you can mark any folder below a content root as Source, Resource Root, Test, or Excluded.

The folders configuration that you define also regulates the behavior of the PhpStorm's Usage of internal entity inspection, which detects incorrect usages of the entities marked as @internal.