PhpStorm
 
Get PhpStorm

Configuring folders within a content root

Last modified: 14 February 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.