PhpStorm 8.0.0 Web Help

    In the terms of PhpStorm, content is a collection of files with which you are currently working, possibly organized in a hierarchy of subfolders. The folder which is the highest in this hierarchy is called content root folder or content root folder for short. A project has at least one content root folder, by default it is the project folder itself.

    Having several content roots enables you to work with files from several directories that do not have a common immediate parent. This is helpful when you use some static contents, for example, icons. You can just save them all in a folder and then specify this folder as an extra content root in several projects.

    By default, all the files in a content root folder are involved in indexing, searching, parsing, code completion, etc. To change this status, folders within a content root can be assigned to the following categories:

    • A Tests folder contains source files related to unit testing. These folders are marked with the icon rootTest.
    • A Sources folder is the root for namespaces used in your project.

      Based on this setting, PhpStorm suggests you the proper folder name when you want to create a new namespace under another parent namespace during creation or moving a PHP class, that is, when you are actually creating or moving a PHP class to a non-existing namespace under another parent namespace. If no Sources folder is specified, you will have to type the proper folder manually.

      Appointing a Sources folder is not mandatory but this helps you keep your project structure in compliance with the PSR0 and PSR4 standards.

    • Resource Root. By assigning a folder to this category you tell PhpStorm that files in it and in its subfolders can be referenced relative to this folder instead of specifying full paths to them. These folders are marked with the icon rootResource.
    • An Excluded folder contains files and folders ignored by PhpStorm when indexing, searching, parsing, watching, etc. These folders are marked with the rootExcluded.gif icon. Usually, one would like to exclude temporary folders, logs, and other project output. Excluding unnecessary paths is a good way to significantly improve performance.

    See Also

    Procedures:

    Reference:

    Web Resources: