PhpStorm 2020.3 Help

Directories

File | Settings | Directories for Windows and Linux
PhpStorm | Preferences | Directories for macOS
Ctrl+Alt+S
the Settings/Preferences button

Use this dialog to configure content roots of a project.

ItemTooltipDescription
the Add buttonAdd Content RootClick this button and select a new content root folder in the dialog that opens.
the Remove buttonRemove Content EntryClick this button to have the selected root removed from the list.
the Tests root iconTestsClick this button to mark the selected folder as a test root.
the Source root iconSourcesClick this button to mark the selected folder as the root for namespaces used in your project.

Based on this setting, PhpStorm suggests 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. See Configure PHP namespaces in a project for details.

the Excluded root iconExcludedClick this button to mark the selected folder as excluded so PhpStorm ignores it during indexing, parsing, and code completion.
the Resources root iconResource RootClick this button to enable PhpStorm to complete relative paths to resources under the selected folder.
Exclude files

In the Exclude files field, type the masks that define the names of files and folders to be excluded, for example, *.min.js or lib. Use semicolons as separators.

  • If the name of a file matches any of these patterns, the file is treated as excluded.

  • If the name of a folder matches a pattern, all the files in this folder and in its subfolders are excluded.

Last modified: 08 March 2021